Anthony Sottile added the comment:
hit this today unfortunately -- I'm working with some pretty complex (and
nested) `typing.NamedTuple` objects and the lack of caching here results in
quite the slowdown (in my macro benchmarks it's the difference between a render
pass taking 180ms and 25ms)
Mark Dickinson added the comment:
Given the responses so far, I suggest closing this as rejected.
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
___
Christian Heimes added the comment:
I'm not too worried about the slightly increased memory usage. For example one
of our largest application instances consumes about 8 GB memory right now. It
has just about 22k tuples in gc.get_objects(). An additional Py_hash_t in
tuple's struct would
Georg Brandl added the comment:
Still, actual benefits in some kind of benchmark will be needed to show that
this is not a premature optimization.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
___
Roundup Robot added the comment:
New changeset 17038de56fd4 by Christian Heimes in branch 'default':
Add a comment about *not* caching the hash value. Issue #9685 suggested to
memorize the hash value, but the feature request was rejected because no speed
ups were found.
Changes by Georg Brandl ge...@python.org:
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
Sorry, Raymond. It was a bad day for Roundup.
--
assignee: - rhettinger
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: rhettinger -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
___
___
Serhiy Storchaka added the comment:
My apologies once again, Raymond. I mistakenly thought that I unassigned the
issue from you (it was a Roundup bug at this day).
As for the issue, I totally agree with Tim.
--
___
Python tracker
Changes by Meador Inge mead...@gmail.com:
--
nosy: +meador.inge
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
___
___
Python-bugs-list
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +Interpreter Core
type: resource usage - performance
versions: +Python 3.4 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: rhettinger -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
___
New submission from David Albert Torpey dt...@users.sourceforge.net:
Dictionary keys are commonly numbers, strings, or tuples. Python has optimized
numbers and strings to remember their hash values on successive calls. Tuples
should do this too since their recursive hash function can take a
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This seems reasonable. Will look at it in the next few days.
--
assignee: - rhettinger
keywords: +easy
nosy: +rhettinger
priority: normal - low
stage: - needs patch
versions: +Python 3.2 -Python 2.6
Tim Peters tim.pet...@gmail.com added the comment:
- Tuple objects don't currently reserve space to store their hash code, so it's
likely this would increase the size of every tuple.
- It's unclear to me which natural use patterns would actually enjoy a major
speed boost. Note that dicts
Benjamin Peterson benja...@python.org added the comment:
FWIW, I'm -1 on this without a demonstrable improvement on some real-world
cases.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Hello Tim! If you have a chance, please also take a look at issue9685 which I
was planning to work on in the next couple of weeks.
For memoizing tuple hashes, I'm inclined to think the one extra field is worth
it. That
Benjamin Peterson benja...@python.org added the comment:
2010/8/25 Raymond Hettinger rep...@bugs.python.org:
I suppose we could prepare a patch, instrument it, and try it with Twisted,
SQLalchemy, and Django to find-out how many tuple hash calculations would be
saved by memoizing.
You
19 matches
Mail list logo