This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xiang.zhang
Recipients methane, serhiy.storchaka, vstinner, xiang.zhang
Date 2016-11-02.16:30:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478104260.01.0.797665822045.issue28580@psf.upfronthosting.co.za>
In-reply-to
Content
python -> unpatched, python3 -> patched

iterkeys:

(split)

./python3 -m perf timeit --compare-to /home/angwer/cpython/python -s 'from argparse import Namespace; ns = Namespace(); [setattr(ns, str(i), str(i)) for i in range(10000)]' 'list(iter(ns.__dict__))'
python: ..................... 112 us +- 1 us
python3: ..................... 109 us +- 1 us

Median +- std dev: [python] 112 us +- 1 us -> [python3] 109 us +- 1 us: 1.03x faster

(combined)

./python3 -m perf timeit --compare-to /home/angwer/cpython/python -s 'd = {x:x for x in range(10000)}' 'list(iter(d))'python: ..................... 84.3 us +- 2.4 us
python3: ..................... 86.0 us +- 3.5 us

Median +- std dev: [python] 84.3 us +- 2.4 us -> [python3] 86.0 us +- 3.5 us: 1.02x slower

pydict_next:

(split)

./python3 -m perf timeit --compare-to /home/angwer/cpython/python -s 'from argparse import Namespace; ns = Namespace(); [setattr(ns, str(i), str(i)) for i in range(10000)]' 'repr(ns.__dict__)'
python: ..................... 1.85 ms +- 0.01 ms
python3: ..................... 1.85 ms +- 0.11 ms

Median +- std dev: [python] 1.85 ms +- 0.01 ms -> [python3] 1.85 ms +- 0.11 ms: 1.00x faster

(combined)

./python3 -m perf timeit --compare-to /home/angwer/cpython/python -s 'd = {x:x for x in range(10000)}' 'repr(d)'
python: ..................... 1.99 ms +- 0.01 ms
python3: ..................... 1.87 ms +- 0.01 ms

Median +- std dev: [python] 1.99 ms +- 0.01 ms -> [python3] 1.87 ms +- 0.01 ms: 1.06x faster
History
Date User Action Args
2016-11-02 16:31:00xiang.zhangsetrecipients: + xiang.zhang, vstinner, methane, serhiy.storchaka
2016-11-02 16:31:00xiang.zhangsetmessageid: <1478104260.01.0.797665822045.issue28580@psf.upfronthosting.co.za>
2016-11-02 16:31:00xiang.zhanglinkissue28580 messages
2016-11-02 16:30:59xiang.zhangcreate