Message58274
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. |
|
| Date |
User |
Action |
Args |
| 2007-12-07 13:28:18 | ntoronto | set | spambayes_score: 0.0234033 -> 0.0234033 recipients:
+ ntoronto |
| 2007-12-07 13:28:17 | ntoronto | set | spambayes_score: 0.0234033 -> 0.0234033 messageid: <1197034097.09.0.871896219058.issue1568@psf.upfronthosting.co.za> |
| 2007-12-07 13:28:17 | ntoronto | link | issue1568 messages |
| 2007-12-07 13:28:16 | ntoronto | create | |
|