Python 2 times slower than Perl

Roman Suzi rnd at onego.ru
Thu Jul 19 01:33:22 EDT 2001


On 18 Jul 2001, Johann Hibschman wrote:

>Roman Suzi writes:
>
>> On Wed, 18 Jul 2001, John J. Lee wrote:
>>> On 18 Jul 2001, Johann Hibschman wrote:
>>> [...]
>>>> cc -O2       0.28
>>>> cc           0.62
>>>> ocamlopt     1.26   (compiled)
>>>> ocaml        9.42   (interpreted)
>>>> perl        28.9
>>>> python      66.8
>
>After re-compiling python with -O2, my result is:
>
>python     31.4
>
>which I find much more believable.  That optimization really helps!
>Perhaps the python configuration process should default to compiling
>with -O2 rather than with -O?

Is -O2 safe?

>> But in my applications speed is not the main virtue. The top thing is
>> express logic in a plain language and this is Python great at.
>
>I have a good bit of leisure time these days (i.e. I'm only barely
>employed), so I've been playing around with ocaml.  It's nice,
>although it took me a while to get up to really understand the
>language.  I like it, quite a bit, but then again I do numerics, so
>speed is always a blessing.

Unfortunately, I do not have leisure time now.

>If you have some time, take a look at ocaml.  It'll teach you
>something.  I don't know if you'll find it useful, but it's
>educational.
>
>> That is why I do not understand why Java is so popular:  it is not large
>> enough improvement over C/C++ in terms of source readability but still
>> poses serious overhead in execution speed... I have the feeling it stalled
>> at the middle between C++ and Python...
>
>I agree with you here, completely.  But it is nice to have GC...

>> _/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
>
>Heh.  My mother was born in Karelia, before she had to move rather
>rapidly to Finland around 1940.  I still would like to visit the area
>one of these days.  All right, so I'm rambling now.

You are welcome! You can also visit http://heninen.net , http://onego.ru
and/or http://karelia.ru to visit us virtually.
I hope, you do not feel bad toward current Karelia population
as some do.

Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Thursday, July 19, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "The bigger they are, the harder they hit you." _/





More information about the Python-list mailing list