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.
This commit is contained in:
parent
b7a285f528
commit
90180c1c3f
|
@ -47,9 +47,9 @@
|
|||
*/
|
||||
|
||||
typedef struct BLOCK {
|
||||
struct BLOCK *leftlink;
|
||||
PyObject *data[BLOCKLEN];
|
||||
struct BLOCK *rightlink;
|
||||
struct BLOCK *leftlink;
|
||||
} block;
|
||||
|
||||
#define MAXFREEBLOCKS 10
|
||||
|
|
Loading…
Reference in New Issue