why python is slower than java?

gabriele renzi rff_rff at remove-yahoo.it
Sat Nov 6 04:56:02 EST 2004


Harald Massa ha scritto:
> Israel Raj T <rambam at bigpond.net.au> wrote in news:878y9gbkh7.fsf at pop-
> server.bigpond.net.au:
> 
> 
>>On the updated version at http://shootout.alioth.debian.org/craps.php,
>>Python beats at least two java implementations.
> 
> 
> Very interesting link, great ressource!!!
> 
> What really is disturbing: within the test "hash access" perl2 comes out 
> first compared with java.
> 
> A know that Python dictionaries are the most heavily used datastructure 
> (because it is allways used within Python itself), and from looking at the 
> sourcecode there is the line "with help from Raymund Hettinger"; so I am 
> very sure it is probably THE optimal coding.
> 
> So... string processing, regular expression, blablabla no problem; but why 
> second to perl2 in Hash-access ???

maybe because perl has been polished for more years :)
Anyway, 3 things worth noting about the shootou

- you won't *ever* write heapsort and things like that in python, 
obviously it is slow, and obviously you have'em builtin.
- there are some tricks like using numarray for matrix calculations
- the ranking system is named CRAP(s).




More information about the Python-list mailing list