WHY is python slow?

Wartan Hachaturow wart at softhome.net
Thu Jun 7 18:38:46 CEST 2001


>>>>> "Bernhard" == Bernhard Reiter writes:

 Bernhard> In article <mailman.991900751.7603.python-list at python.org>,
 Bernhard> 	Steven Haryanto <steven at haryan.to> writes:
 >> Although it is generally accepted that Python is slower than
 >> Java/Perl/Ruby,

 Bernhard> Well, actually I do not accept this. :) Speed comparisons are

 I'll try to be short and descriptive ;)


wart at penguin:~$ cat test.py
print 'Hello, world!'

wart at penguin:~$ cat test.pl
print "Hello, world!\n";

wart at penguin:~$ time perl test.pl
Hello, world!

real    0m0.031s
user    0m0.030s
sys     0m0.000s

wart at penguin:~$ time python test.py
Hello, world!

real    0m0.050s
user    0m0.030s
sys     0m0.010s

wart at penguin:~$ time python -S test.py
Hello, world!

real    0m0.018s
user    0m0.010s
sys     0m0.010s


P.S. While the real time of the last command was floating from 0.018 to
0.025 between the runs, but it is anyway less than that of perl ;)

-- 
Regards, Wartan.
echo "Your stdio isn't very std." 
		-- Larry Wall in Configure from the perl distribution



More information about the Python-list mailing list