Message49936
| Author |
tim.peters |
| Recipients |
| Date |
2006年04月01日.23:00:21 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Logged In: YES
user_id=31435
I don't want this: it increases the size of all tuple
objects without obvious (let alone compelling) benefit. All
strings are hashable, but not all tuples are. Python
internals arrange to force string interning in many
speed-sensitive cases, but only the empty tuple is interned
and hashing the empty tuple goes fast anyway; that makes it
less likely that a cached tuple hash will ever do any good.
Finally, len(tuple) is typically small so the time needed
for hash(tuple) is also typically small (for tuples and
strings, the hash time is proportional to the number of
elements, and strings are typically "bigger" this way). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 15:47:35 | admin | link | issue1462796 messages |
| 2007年08月23日 15:47:35 | admin | create |
|