[Python-checkins] cpython: Tweak the deque struct by moving the least used fields (maxlen and weakref) to

raymond.hettinger python-checkins at python.org
Sun Jul 14 07:30:49 CEST 2013


http://hg.python.org/cpython/rev/c952f3d122ae
changeset:   84620:c952f3d122ae
user:        Raymond Hettinger <python at rcn.com>
date:        Sat Jul 13 22:30:25 2013 -0700
summary:
  Tweak the deque struct by moving the least used fields (maxlen and weakref) to the end.

files:
  Modules/_collectionsmodule.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -119,8 +119,8 @@
     block *rightblock;
     Py_ssize_t leftindex;       /* in range(BLOCKLEN) */
     Py_ssize_t rightindex;      /* in range(BLOCKLEN) */
+    long state;                 /* incremented whenever the indices move */
     Py_ssize_t maxlen;
-    long state;         /* incremented whenever the indices move */
     PyObject *weakreflist; /* List of weak references */
 } dequeobject;
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list