[pypy-issue] [issue1432] set(xrange(n)) is slower than set(range(n))

Brian Kearns tracker at bugs.pypy.org
Mon Mar 25 14:15:58 CET 2013


Brian Kearns <bdkearns at gmail.com> added the comment:

xrange is also slower in min/max for example. list(xrange(n)) should also be 
able to be as fast as range(n), and it isn't.

one optimization would be for listview on an xrange object or xrange iterator to 
return a RangeList instead of going through unpackiterable on the xrange.

another optimization is for set creation from iterable to get a jitdriver like 
list extend.

----------
nosy: +bdk
status: unread -> chatting

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1432>
________________________________________


More information about the pypy-issue mailing list