Improve struct cache locality by bring commonly accessed fields close together.
authorRaymond Hettinger <python@rcn.com>
Fri, 20 Feb 2015 08:50:04 +0000 (00:50 -0800)
committerRaymond Hettinger <python@rcn.com>
Fri, 20 Feb 2015 08:50:04 +0000 (00:50 -0800)
Modules/_randommodule.c

index 4377ee0cf4d90ce78b1970636236599e0e0be1c3..af861820a2e520693b076be86a49aca496533df5 100644 (file)
@@ -78,8 +78,8 @@
 
 typedef struct {
     PyObject_HEAD
-    unsigned long state[N];
     int index;
+    unsigned long state[N];
 } RandomObject;
 
 static PyTypeObject Random_Type;