[Python-Dev] PEP 203 Augmented Assignment
Eric S. Raymond
Fri, 28 Jul 2000 10:32:56 -0400
Guido van Rossum <email@example.com>:
> > Which makes me think that, if we want to do something about cache effects,
> > it is probably not a bad idea to just "reorder" the bytecodes in the big
> > switch by decreasing frequency (we have some stats about this -- I believe
> > Skip and MAL have discussed the opcodes' frequency and the charts lie
> > somewhere in the archives). I remember Marc-Andre had done something in
> > this direction and reported some perf improvements too. Since reordering
> > the opcodes doesn't really hurt, if I'm about to do something with the
> > main loop, it'll be only this.
> Go for it -- sounds good!
Allow me to also suggest liberal use of "inline" for small helper
functions called from within the main interpreter loop. The
nonlocality produced by subroutine calls plays hell with small caches.
Side observation: the fact that micro-optimizations are giving us measurable
speedups tells us that the higher-level architecture and algoirithms are
very well tuned. Take a bow, Guido!
<a href="http://www.tuxedo.org/~esr">Eric S. Raymond</a>
"Government is not reason, it is not eloquence, it is force; like fire, a
troublesome servant and a fearful master. Never for a moment should it be left
to irresponsible action."
-- George Washington, in a speech of January 7, 1790