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 rhettinger
Recipients pitrou, rhettinger, serhiy.storchaka
Date 2015-03-01.08:36:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425199002.77.0.00010601604597.issue23553@psf.upfronthosting.co.za>
In-reply-to
Content
I think the source in listobject.c would be benefit from a well-named macro for this.  That would provide the most clarity.   For deques, I'll just put in the simple patch because it only applies to a place that is already doing unsigned arithmetic/comparisons.

FWIW, I don't usually use benchmarking on these kinds of changes.  The generated assembler is sufficiently informative.   Benchmarking each tiny change risks getting trapped in a local minimum.  Also, little timeit tests tend to branch the same way every time (which won't show the cost of prediction misses) and it tends to have all code and data in cache (so you don't see the effects of cache misses) and it risks tuning to a single processor (in my case a haswell).   Instead, I look at the code generated by GCC and CLang to see that it does less work.
History
Date User Action Args
2015-03-01 08:36:42rhettingersetrecipients: + rhettinger, pitrou, serhiy.storchaka
2015-03-01 08:36:42rhettingersetmessageid: <1425199002.77.0.00010601604597.issue23553@psf.upfronthosting.co.za>
2015-03-01 08:36:42rhettingerlinkissue23553 messages
2015-03-01 08:36:42rhettingercreate