[Python-checkins] cpython: Improve struct cache locality by bring commonly accessed fields close together.
raymond.hettinger
python-checkins at python.org
Fri Feb 20 09:50:10 CET 2015
https://hg.python.org/cpython/rev/0ba4bcc0a7a6
changeset: 94696:0ba4bcc0a7a6
user: Raymond Hettinger <python at rcn.com>
date: Fri Feb 20 00:50:04 2015 -0800
summary:
Improve struct cache locality by bring commonly accessed fields close together.
files:
Modules/_randommodule.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -78,8 +78,8 @@
typedef struct {
PyObject_HEAD
+ int index;
unsigned long state[N];
- int index;
} RandomObject;
static PyTypeObject Random_Type;
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list