74 Commits (6dbca367dceda3999979bdc3cdcfdb201f40d044)

Author SHA1 Message Date
Raymond Hettinger 9acbb6074f Move make_key() out of the decorator body. Make keys that only need to be hashed once. 14 years ago
Raymond Hettinger 018b4fbb9b Use a flag to indicate when the circular queue is fully populated and stable. 14 years ago
Raymond Hettinger 34d94a2101 Handle a possible race condition 14 years ago
Raymond Hettinger b6b98c093e Track the cache size directly. 14 years ago
Raymond Hettinger 9f0ab9f564 Factor out shared variables. 14 years ago
Raymond Hettinger 678e7f3be6 Flatten the lru cache keyword args tuple for better memory utilization. 14 years ago
Raymond Hettinger c6897854f8 Fix-up a comment 14 years ago
Raymond Hettinger 7f7a5a7b87 Fix-up comments and add a sentinel variable for clarity. 14 years ago
Raymond Hettinger 41eb79a016 No need to create and destroy links when updating a fixed-sized circular queue. 14 years ago
Raymond Hettinger 1ff50df8bc Minor cleanup: add whitespace, add comments, bring function attribute updates together. 14 years ago
Raymond Hettinger 7dabfede34 Fix whitespace 14 years ago
Raymond Hettinger 7e0c581c49 Low overhead path for maxsize==0 14 years ago
Raymond Hettinger bc8e81dcc3 Section-off the source for better readability. 14 years ago
Raymond Hettinger dce583e0bd Minor beautification. 14 years ago
Raymond Hettinger 4f5139ba20 Root variable is not changed. 14 years ago
Raymond Hettinger 202d1ad3f6 Fix whitespace 14 years ago
Raymond Hettinger d37fb55910 Unique sentinel value for cache.get() 14 years ago
Raymond Hettinger 6e8c817687 Refactor calculation of the cache key. Minor code cleanups. 14 years ago
Benjamin Peterson 954cf578c7 clear the root with the cache 14 years ago
Raymond Hettinger d656958915 Minor code cleanup. 14 years ago
Raymond Hettinger 57b2959d26 Eliminate duplicate link lookup. Minor cleanup. 14 years ago
Raymond Hettinger ec0e91045e Improve the memory utilization (and speed) of functools.lru_cache(). 14 years ago
Meador Inge ff7f64ca0e Issue #13544: Add __qualname__ to functools.WRAPPER_ASSIGNMENTS. 14 years ago
Raymond Hettinger 4b779b3785 Issue 13177: Make tracebacks more readable by avoiding chained exceptions in the lru_cache. 14 years ago
Raymond Hettinger cd9fdfd652 Issue 13227: Option to make the lru_cache() type specific (suggested by Andrew Koenig). 14 years ago
Raymond Hettinger 8cd2e5f751 Sync-up minor code edits with the default branch. 15 years ago
Raymond Hettinger 003be52932 Fix __hash__ in functools.cmp_to_key() to work with collections.Hashable. 15 years ago
Raymond Hettinger 7ab9e22e34 Issue #11707: Fast C version of functools.cmp_to_key() 15 years ago
Raymond Hettinger a0d1d96771 Issue #11628: cmp_to_key should use __slots__. 15 years ago
Raymond Hettinger 7e4c168385 Minor optimization -- factor a constant expression out of the inner-loop. 15 years ago
Raymond Hettinger 524359f9f7 Add comment. 15 years ago
Raymond Hettinger 23f9fc3448 Issue #10042: Fixed the total_ordering decorator to handle cross-type 15 years ago
Raymond Hettinger c79fb0e52d Issue 10593: Adopt Nick's suggestion for an lru_cache with maxsize=None. 15 years ago
Raymond Hettinger 00f2f97dbd Doc and docstring nits. 15 years ago
Raymond Hettinger 7496b4171e Add example, tighten text, and minor clean-ups. 15 years ago
Raymond Hettinger 5e20bab422 Neaten-up a bit. 15 years ago
Nick Coghlan 234515afe5 Issue 10586: change the new functools.lru_cache implementation to expose the maximum and current cache sizes through the public statistics API. This API is now a single function that returns a named tuple. 15 years ago
Raymond Hettinger 5fa40c01ad Clean-up docstring, comments, and whitespace. 15 years ago
Raymond Hettinger 3255c63e28 Improve comment 16 years ago
Raymond Hettinger 1006bd459b Future proof total_ordering against changes in methods defined on object. 16 years ago
Raymond Hettinger bd88802c1f Revert r84700 which had an unfortunate performance cost. 16 years ago
Raymond Hettinger 22b46e0ba9 Separate positional arguments from localized globals. 16 years ago
Benjamin Peterson 1017ae5253 add reduce and partial to __all__ 16 years ago
Raymond Hettinger f45abc97bf Add method to OrderedDict for repositioning keys to the ends. 16 years ago
Raymond Hettinger 4c7c9af542 Clean-up functools.total_ordering(). 16 years ago
Raymond Hettinger 02566ec89f Adopt more descriptive attribute names as suggested on python-dev. 16 years ago
Raymond Hettinger af1e140334 Readability nit. 16 years ago
Raymond Hettinger 7babc1b6a5 Better method name. Tighten inner-loop with bound methods. 16 years ago
Raymond Hettinger 38d17e3df0 Speed-up cache updates 16 years ago
Benjamin Peterson 16925e8539 remove parens 16 years ago