loop in python
bruno modulix
onurb at xiludom.gro
Mon Aug 22 11:25:18 EDT 2005
km wrote:
> Hi all,
>
> Why is it that the implementation of empty loop so slow in python when compared to perl ?
>
> #i did this in python (v 1.5)
Python 1.5.2 was released in april 1999. Current Python version is 2.4.1.
Please consider upgrading - unless of course you just want to troll...
> for x in xrange(1000):
> print x
This is not an empty loop. An empty loop is
for x in xrange(1000):
pass
> Is python runtime slow at all aspects when compared to perl ?
Is your question serious or are you just trolling ?
> I really wonder what makes python slower than perl ?
I really wonder what makes my old P133/32mo running w98 slower that my
more recent XP1200/256mo running gentoo/linux.
> Is there any proposal to make python faster in future versions ?
The future is already here....
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list
mailing list