Magic Optimisation

Paul Rubin http
Mon Sep 5 00:43:50 EDT 2005


simonwittber at gmail.com writes:
> My use case involves < 1000 iterators, so psyco is not much help. It
> doesn't solve the magic creation of locals from instance vars either.

How about using __slots__ to put those instance vars at fixed offsets
in the pool object (self then needs to be a new-style class instance).
That might or might not avoid the dict lookups.



More information about the Python-list mailing list