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 christian.heimes
Recipients asvetlov, benjamin.peterson, christian.heimes, jcea, jcon, phihag, pitrou, rhettinger, serhiy.storchaka, vstinner
Date 2013-02-28.11:06:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1362049568.14.0.976934882578.issue16465@psf.upfronthosting.co.za>
In-reply-to
Content
The patch gives a measurable speedup (./python is a patched 3.3.0+). IMO we should apply it. It's small and I can see no harm, too.

$ for PY in python2.7 python3.2 python3.3 ./python; do cmd="$PY -R -m timeit -n 10000000 '{};{};{};{};{};{};{};{};{};{}'"; echo $cmd; eval $cmd; done
python2.7 -R -m timeit -n 10000000 '{};{};{};{};{};{};{};{};{};{}'
10000000 loops, best of 3: 0.162 usec per loop
python3.2 -R -m timeit -n 10000000 '{};{};{};{};{};{};{};{};{};{}'
10000000 loops, best of 3: 0.142 usec per loop
python3.3 -R -m timeit -n 10000000 '{};{};{};{};{};{};{};{};{};{}'
10000000 loops, best of 3: 0.669 usec per loop
./python -R -m timeit -n 10000000 '{};{};{};{};{};{};{};{};{};{}'
10000000 loops, best of 3: 0.381 usec per loop

$ for PY in python2.7 python3.2 python3.3 ./python; do cmd="$PY -R -m timeit -n 10000000 'int(\"1\", base=16)'"; echo $cmd; eval $cmd; done
python2.7 -R -m timeit -n 10000000 'int("1", base=16)'
10000000 loops, best of 3: 0.268 usec per loop
python3.2 -R -m timeit -n 10000000 'int("1", base=16)'
10000000 loops, best of 3: 0.302 usec per loop
python3.3 -R -m timeit -n 10000000 'int("1", base=16)'
10000000 loops, best of 3: 0.477 usec per loop
./python -R -m timeit -n 10000000 'int("1", base=16)'
10000000 loops, best of 3: 0.356 usec per loop
History
Date User Action Args
2013-02-28 11:06:08christian.heimessetrecipients: + christian.heimes, rhettinger, jcea, pitrou, vstinner, benjamin.peterson, phihag, asvetlov, jcon, serhiy.storchaka
2013-02-28 11:06:08christian.heimessetmessageid: <1362049568.14.0.976934882578.issue16465@psf.upfronthosting.co.za>
2013-02-28 11:06:08christian.heimeslinkissue16465 messages
2013-02-28 11:06:07christian.heimescreate