diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2018-11-09 10:31:56 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-09 10:31:56 (GMT) |
commit | cf5863faabe011a61827b9b9982dba3d6a381f0f (patch) | |
tree | bff379775cf8c34899333006c05d78ef01d4f909 /Lib/random.py | |
parent | b83942c755a78f6d917743b73ed87a8fd9f367de (diff) | |
download | cpython-cf5863faabe011a61827b9b9982dba3d6a381f0f.zip cpython-cf5863faabe011a61827b9b9982dba3d6a381f0f.tar.gz cpython-cf5863faabe011a61827b9b9982dba3d6a381f0f.tar.bz2 |
Optimize set.pop() to advance a pointer instead of indexing. (GH-10429)
Gives approx 20% speed-up using clang depending on the number of elements in the set (the less dense the set, the more the speed-up).
Uses the same entry++ logic used elsewhere in the setobject.c code.
Diffstat (limited to 'Lib/random.py')
0 files changed, 0 insertions, 0 deletions