diff options
author | Raymond Hettinger <python@rcn.com> | 2015-02-27 07:21:29 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-02-27 07:21:29 (GMT) |
commit | daf57f25e5690cfaa4636ccf0d113908dc0783a4 (patch) | |
tree | 9dea7077c9a9350ef293ac5cf0ad40daf9cb4ce2 /Lib/test/test_deque.py | |
parent | b1e6e57a170d39733937176431767983f8e82ab7 (diff) | |
download | cpython-daf57f25e5690cfaa4636ccf0d113908dc0783a4.zip cpython-daf57f25e5690cfaa4636ccf0d113908dc0783a4.tar.gz cpython-daf57f25e5690cfaa4636ccf0d113908dc0783a4.tar.bz2 |
Bump the blocksize up from 62 to 64 to speed up the modulo calculation.
Remove the old comment suggesting that it was desireable to have
blocksize+2 as a multiple of the cache line length. That would
have made sense only if the block structure start point was always
aligned to a cache line boundary. However, the memory allocations
are 16 byte aligned, so we don't really have control over whether
the struct spills across cache line boundaries.
Diffstat (limited to 'Lib/test/test_deque.py')
-rw-r--r-- | Lib/test/test_deque.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py index e336e5a..0eebbff 100644 --- a/Lib/test/test_deque.py +++ b/Lib/test/test_deque.py @@ -542,7 +542,7 @@ class TestBasic(unittest.TestCase): @support.cpython_only def test_sizeof(self): - BLOCKLEN = 62 + BLOCKLEN = 64 basesize = support.calcobjsize('2P4nlP') blocksize = struct.calcsize('2P%dP' % BLOCKLEN) self.assertEqual(object.__sizeof__(deque()), basesize) |