[issue5986] Avoid reversed() in Random.shuffle()
report at bugs.python.org
Mon May 11 09:44:25 CEST 2009
Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
FWIW, the inefficiency is only in the loop setup, the time to call
reversed() and __reversed__(). The inner loop runs at the same speed
because xrange provides a __reversed__ iterator.
Please do not go through the standard library making these minor tweaks
without making sure there is a significant measured speed-up and do
consider the readability issue.
resolution: -> rejected
status: open -> closed
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list