A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-December/075575.html below:

[Python-Dev] PATCH: attribute lookup caching for 2.6

[Python-Dev] PATCH: attribute lookup caching for 2.6 [Python-Dev] PATCH: attribute lookup caching for 2.6Neil Toronto ntoronto at cs.byu.edu
Thu Dec 6 03:43:22 CET 2007
Phillip J. Eby wrote:
> At 10:48 PM 12/5/2007 +0100, Georg Brandl wrote:
>> Neil Toronto schrieb:
>>> So Jim and PJE finally convinced me to do it the right way. :) Thanks
>>> guys - it turned out very nice.
>> How does this relate to Armin Rigo's method cache patch?
>>
>> (http://bugs.python.org/issue1685986)
> 
> Interesting.  Armin's approach uses a single global cache of up to 
> 1024 descriptors.  That seems a lot simpler than anything I thought 
> of, and might perform better by encouraging the processor to keep the 
> descriptors in cache.  It has a lot less pointer indirection, and has 
> a dirt-simple way of invalidating a class' entries when something changes.

Hey, I took out all my extra pointer indirection. :p

FWIW, I like it. Though the hash should really incorporate the hash of 
the type name as well as the attribute's so that sometype.method calling 
othertype.method doesn't invalidate the cache. Locality makes the global 
cache work, but locality also often means re-using the same names.

Neil
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4