[Python-Dev] ineffective optimization: method tables

Guido van Rossum guido@digicool.com
Mon, 23 Apr 2001 11:21:02 -0400


> Well, I wasted a fair amount of my time for no apparent gain.
[...]
> Unfortunately, all my benchmarks show this patch to
> be ineffective in terms of speeding up the interpreter.  Anyone
> know why?

Probably you're optimizing something that is already quite fast.
While your code saves a C call and a few tests, those kind of
operations are rarely what slows down Python these days.  My suspicion
is that most of the the time goes into (1) allocating and deallocating
objects, and (b) calling methods...

--Guido van Rossum (home page: http://www.python.org/~guido/)