Commit 90180c1c authored by Raymond Hettinger's avatar Raymond Hettinger

Move the leftlink to the end of the block structure.

The current pattern of memory access will update both the leftlink and
rightlink at the same time, so they should be positioned side-by-side
for better cache locality.

Keeping the leftlink at the front of the structure would make sense
only if the paired updates were eliminated by backporting changesets
49a9c734304d, 3555cc0ca35b, ae9ee46bd471, and 744dd749e25b.  However,
that isn't likely to happen, so we're better off with the leftlink at
the end of the structure.
parent b7a285f5
......@@ -47,9 +47,9 @@
*/
typedef struct BLOCK {
struct BLOCK *leftlink;
PyObject *data[BLOCKLEN];
struct BLOCK *rightlink;
struct BLOCK *leftlink;
} block;
#define MAXFREEBLOCKS 10
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment