[issue29216] Space saving step for the LRU cache

2018-01-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've lost interest in this. -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue29216] Space saving step for the LRU cache

2017-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, there is a wart in the optimization in Python implementation. If call a cached function with multiple integer arguments and with equivalent float arguments, the second call will return a cached result. But if call with single integer and float arguments,

[issue29216] Space saving step for the LRU cache

2017-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The first patch fails with e.g. tuple subclasses. The optimization is correct only for types not comparable with tuples. Tuple subclasses are comparable, and classes with custom __eq__ can be comparable. Thus the optimization should be used only for exact bu

[issue29216] Space saving step for the LRU cache

2017-01-09 Thread Raymond Hettinger
New submission from Raymond Hettinger: Sync with the space savings optimization in the pure Python code. I'm unsure whether the best way is to check for an exact tuple or whether to just check an exact int/str. -- assignee: serhiy.storchaka components: Library (Lib) files: functools_sy

[issue29216] Space saving step for the LRU cache

2017-01-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file46229/functools_sync2.diff ___ Python tracker ___ ___ Python-bugs-list m