A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/043777.html below:

[Python-Dev] genexps slow?

[Python-Dev] genexps slow? [Python-Dev] genexps slow?Guido van Rossum guido at python.org
Wed Mar 31 00:29:23 EST 2004
Can anybody explain this?

[guido at guido linux]$ ./python ../Lib/timeit.py -s 'r=range(10000)' 'sum([x for x in r])'
100 loops, best of 3: 7.75 msec per loop
[guido at guido linux]$ ./python ../Lib/timeit.py -s 'r=range(10000)' 'sum(x for x in r)'
100 loops, best of 3: 8.23 msec per loop

(I believe this is with the penultimate version of the patch from SF.)

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4