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) > for x in xrange(1000): > print x > # this took 0.017 seconds > -------------------------- > #similar code in perl (v 5.6): > for $x (0..1000) > { > print $x; > } > # this took 0.005 seconds only !!! > > Is python runtime slow at all aspects when compared to perl ? > I really wonder what makes python slower than perl ?
Yeah but the python version took 2.1 less seconds to type. Python runs as fast as Perl. -- http://mail.python.org/mailman/listinfo/python-list