Re: Comparison of Euphoria vs Perl, Python, PHP
Jeremy Cowgar wrote:
>
> }}}
<eucode>
> --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
> </eucode>
{{{
>
Oh, I forgot to show the difference if not using sprint(i) but i directly.
[jeremy@jdesk ~]$ time exu hash.ex
100000
real 0m1.010s
user 0m1.003s
sys 0m0.003s
vs.
[jeremy@jdesk ~]$ time exu hash.ex
100000
real 0m1.852s
user 0m1.850s
sys 0m0.003s
That's quite a difference!
--
Jeremy Cowgar
http://jeremy.cowgar.com
|
Not Categorized, Please Help
|
|