]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Restore the data block size to 62.
authorRaymond Hettinger <python@rcn.com>
Sun, 28 Jul 2013 09:39:49 +0000 (02:39 -0700)
committerRaymond Hettinger <python@rcn.com>
Sun, 28 Jul 2013 09:39:49 +0000 (02:39 -0700)
commit77578204d6aeb89a9ee8365f8fb28ce18aa2eb7c
tree303daae3dfcb80a883facdae7d593e3e099779c3
parent1f1d0a57fad17fb0fb1e1a44b1a38be17ea9976e
Restore the data block size to 62.

The former block size traded away good fit within cache lines in
order to gain faster division in deque_item().  However, compilers
are getting smarter and can now replace the slow division operation
with a fast integer multiply and right shift.  Accordingly, it makes
sense to go back to a size that lets blocks neatly fill entire
cache-lines.

GCC-4.8 and CLANG 4.0 both compute "x // 62" with something
roughly equivalent to "x * 9520900167075897609 >> 69".
Lib/test/test_deque.py
Modules/_collectionsmodule.c