4 ms·
list comprehensions of course!
by robert-zaremba 14y ago
list comprehensions of course!
- signed0 14y agoThe exclamation led me to believe you were being facetious, but https://bitbucket.org/pypy/pypy/wiki/JitFriendliness https://bitbucket.org/pypy/pypy/wiki/JitFriendliness agrees with you: "As of now (Feb 2011) generators are usually slower than corresponding code not using generators. Same goes for generator expressions. For most cases using list comprehension is faster."