85 Commits (6b7786bac2feed64b14344cdac9ea0ead24efd78)

Author SHA1 Message Date
Raymond Hettinger 5402315626 Add implementation notes 12 years ago
Benjamin Peterson 9cb33b7d03 correct defaultdict signature in docstring (closes #20250) 12 years ago
Victor Stinner e7f516cbb8 Issue #19512: _count_elements() of _collections reuses PyId_get identifier 12 years ago
Raymond Hettinger cb1d96f782 Issue #18594: Make the C code more closely match the pure python code. 12 years ago
Raymond Hettinger 224c87d60c Issue #18594: Fix the fallback path in collections.Counter(). 12 years ago
Raymond Hettinger 2ff2190b62 Issue #18594: Fix the fast path for collections.Counter(). 12 years ago
Raymond Hettinger 77578204d6 Restore the data block size to 62. 13 years ago
Raymond Hettinger 3223dd5c22 Assertions key off NDEBUG 13 years ago
Raymond Hettinger b97cc49c3a Minor code simplification by eliminating an unnecessary temporary variable. 13 years ago
Raymond Hettinger 90dea4ce43 Tweak the deque struct by moving the least used fields (maxlen and weakref) to the end. 13 years ago
Raymond Hettinger 840533bf1c Use a do-while loop in the inner loop for rotate (m is always greater than zero). 13 years ago
Raymond Hettinger 3959af9b2a Move the freeblock() call outside the main loop to speed-up and simplify the block re-use logic. 13 years ago
Raymond Hettinger d9c116ca40 Add a spacing saving heuristic to deque's extend methods 13 years ago
Raymond Hettinger b385529ddf Fix #ifdef 13 years ago
Raymond Hettinger 82df925451 Use macros for marking and checking endpoints in the doubly-linked list of blocks. 13 years ago
Raymond Hettinger f3a67b7e57 Improve variable names in deque_count() 13 years ago
Raymond Hettinger df715ba54d Apply the PyObject_VAR_HEAD and Py_SIZE macros 13 years ago
Raymond Hettinger 5bfa8671bc Refactor deque_traverse(). 13 years ago
Raymond Hettinger 98054b4c1b Remove unnecessary branches from count() and reverse(). 13 years ago
Raymond Hettinger de68e0cf0e Speed-up deque indexing by changing the deque block length to a power of two. 13 years ago
Raymond Hettinger 20b0f87e1d Misc improvements to collections.deque() 13 years ago
Raymond Hettinger 986bbfc079 Backport deque.rotate() improvements. 13 years ago
Raymond Hettinger 6688bdbe77 Minor cleanups. 13 years ago
Raymond Hettinger 59cf23ab07 Minor tweaks to varnames, declarations, and comments. 13 years ago
Raymond Hettinger 1f0044c473 Minor variable access clean-ups for deque.rotate(). 13 years ago
Raymond Hettinger a4409c18eb Minor edits: Tighten-up the halflen logic and touch-up the assertions and comments. 13 years ago
Raymond Hettinger 3a9ae7fd98 Issue 16398: One more assertion for good measure. 13 years ago
Raymond Hettinger 231ee4dc9d Issue 16398: Add assertions to show why memcmp is safe. 13 years ago
Raymond Hettinger 426453282c Issue 16398: Use memcpy() in deque.rotate(). 13 years ago
Raymond Hettinger 21777acd68 Issue 16398: Use memcpy() in deque.rotate(). 13 years ago
Benjamin Peterson 0e5c48a917 make deque_clear void, since it's infallible 13 years ago
Benjamin Peterson 40056de9f5 make deque_clear void, since it's infallible 13 years ago
Raymond Hettinger 2cdb6435d6 Issue #16398: Optimize deque.rotate() 13 years ago
Raymond Hettinger 464d89b3ce Issue #16398: Optimize deque.rotate() 13 years ago
Andrew Svetlov 6a5c7c341a Fix docstring for deque ctor to mark iterable parameter optional 13 years ago
Andrew Svetlov 227f59b29c Fix docstring for deque ctor to mark iterable parameter optional 13 years ago
Jesus Cea 16e2fca47e Closes #15469: Correct __sizeof__ support for deque 14 years ago
Jesus Cea d4e58dc966 Closes #15469: Correct __sizeof__ support for deque 14 years ago
Kristján Valur Jónsson 31668b8f7a Issue #14288: Serialization support for builtin iterators. 14 years ago
Antoine Pitrou c39cd783fb Issue #13015: Fix a possible reference leak in defaultdict.__repr__. 14 years ago
Antoine Pitrou f5f1fe0cb5 Issue #13015: Fix a possible reference leak in defaultdict.__repr__. 14 years ago
Martin v. Löwis bd928fef42 Rename _Py_identifier to _Py_IDENTIFIER. 14 years ago
Martin v. Löwis 1ee1b6fe0d Use identifier API for PyObject_GetAttrString. 14 years ago
Martin v. Löwis afe55bba33 Add API for static strings, primarily good for identifiers. 14 years ago
Brian Curtin dfc80e3d97 Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED. 15 years ago
Victor Stinner a154b5cea4 Simplify _count_elements() in _collections 15 years ago
Raymond Hettinger 4974705a02 Issue 11713: clarify docstring for collections.deque() 15 years ago
Raymond Hettinger d6c1d57195 Issue 11713: clarify docstring for collections.deque() 15 years ago
Raymond Hettinger db9d64b367 Issue 11713: clarify docstring for collections.deque() 15 years ago
Raymond Hettinger 57a8689b55 Issue 11004: Fix edge case for deque.count(). 15 years ago