]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport c952f3d122ae: Tweak the deque struct by moving the least used fields
authorRaymond Hettinger <python@rcn.com>
Tue, 16 Jul 2013 09:34:19 +0000 (02:34 -0700)
committerRaymond Hettinger <python@rcn.com>
Tue, 16 Jul 2013 09:34:19 +0000 (02:34 -0700)
(maxlen and weakref) to the end.

Modules/_collectionsmodule.c

index b0fa23dfa1877836ac8417833d597e56eef037b5..dc31cbc9b0e744f583b2041e2def27f4160acb4e 100644 (file)
@@ -99,8 +99,8 @@ typedef struct {
     Py_ssize_t leftindex;       /* in range(BLOCKLEN) */
     Py_ssize_t rightindex;      /* in range(BLOCKLEN) */
     Py_ssize_t len;
-    Py_ssize_t maxlen;
     long state;         /* incremented whenever the indices move */
+    Py_ssize_t maxlen;
     PyObject *weakreflist; /* List of weak references */
 } dequeobject;