This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ntoronto
Recipients ntoronto
Date 2007-12-07.13:28:15
SpamBayes Score 0.02340328
Marked as misclassified No
Message-id <1197034097.09.0.871896219058.issue1568@psf.upfronthosting.co.za>
In-reply-to
Content
This is a half-port of the patches in #1685986 and #1700288 to Python
3.0. Speedups are about the same as in those patches applied to their
respective Python versions for minibenchmarks (included in the patch as
fastattr_test_py3k.py): 5%-30% or more depending on how deep the class
hierarchy is. Pybench takes 4% less time on my system, and pystone takes
6% less time.

(Pybench would do better, but SpecialClassAttribute runs long and spends
half its time setting class attributes.)

The main difference between this and the previous patches is that 3.0's
simplifications allow a smaller footprint and make it easier to analyze
its correctness. Specifically, the fact that every object in the MRO
must be a type allows us to assume that every attribute lookup is
cacheable, and allows integration into the update_subclasses mechanism
when attributes are set. The lack of compiled extension modules means
there is no flag to check to see whether a type object supports caching.
Files
File name Uploaded
python30-attrcache.diff ntoronto, 2007-12-07.13:28:16
History
Date User Action Args
2007-12-07 13:28:18ntorontosetspambayes_score: 0.0234033 -> 0.02340328
recipients: + ntoronto
2007-12-07 13:28:17ntorontosetspambayes_score: 0.0234033 -> 0.0234033
messageid: <1197034097.09.0.871896219058.issue1568@psf.upfronthosting.co.za>
2007-12-07 13:28:17ntorontolinkissue1568 messages
2007-12-07 13:28:16ntorontocreate