Re: Comparison of Euphoria vs Perl, Python, PHP
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
|
Not Categorized, Please Help
|
|