Re: Comparison of Euphoria vs Perl, Python, PHP
- Posted by Jeremy Cowgar <jeremy at cowg??.com> Jun 12, 2008
- 786 views
A very dumb check of the hash implementations between Python and Euphoria: count = 100000 dict = {} for i in range(count): dict[str(i)] = i for i in range(count): c = dict[str(i)] print(c)
--include sequence.e include map.e as map integer c map:map m constant count = 100000 m = map:new() for i = 1 to count do m = map:put(m, sprint(i), i) end for for i = 1 to count do c = map:get(m, sprint(i), 0) end for ? c
[jeremy@jdesk ~]$ time python hash.py 99999 real 0m0.233s user 0m0.220s sys 0m0.010s [jeremy@jdesk ~]$ time exu hash.ex 100000 real 0m1.852s user 0m1.850s sys 0m0.003s [jeremy at jdesk ~]$ time ./hash 100000 real 0m1.573s user 0m1.563s sys 0m0.010s -- Jeremy Cowgar http://jeremy.cowgar.com