[New-bugs-announce] [issue5986] Avoid reversed() in Random.shuffle()
STINNER Victor
report at bugs.python.org
Sun May 10 19:29:36 CEST 2009
New submission from STINNER Victor <victor.stinner at haypocalc.com>:
reversed(xrange(1, len(x))) is inefficient, xrange(len(x) - 1, 0, -1)
gives exactly the same sequence but avoid reversed(). See attached
patch. Don't expect amazing speedup.
----------
components: Library (Lib)
files: shuffle.patch
keywords: patch
messages: 87531
nosy: haypo
severity: normal
status: open
title: Avoid reversed() in Random.shuffle()
Added file: http://bugs.python.org/file13947/shuffle.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5986>
_______________________________________
More information about the New-bugs-announce
mailing list