Is Python really slow?

Janne Sinkkonen janne at
Sat May 27 13:18:36 EDT 2000

Alexander <alecdem at> writes:

> for k in xrange(1,100000000):
>    pass
> and the same one in  C
> for ( i = 0 ; i < 1e8; i++ ) ;
> and the second one seems to be working hundreds of times faster than the
> first one
> Can I do anything with that.


If the efficiency of empty loops is important for you application, you
could write a C module which implements them.  See for more information.


More information about the Python-list mailing list