[Python-Dev] Python Specializing Compiler

est@hyperreal.org est@hyperreal.org
Sat, 23 Jun 2001 22:38:06 -0700 (PDT)


Am I seeing things or does it actually speed up five to six times on
my machine?  Very exciting!

timing specializing_call(<mcnodes.CodeObjectTaker instance at 0x8166d74>, 2000)...
result 1952145856 in 4.94 seconds
timing specializing_call(<mcnodes.CodeObjectTaker instance at 0x8166d74>, 2000)...
result 1952145856 in 3.91 seconds
timing f(2000,)...
result 1952145856 in 25.17 seconds

I wonder to what extent this approach can be applied to method calls.
My analysis of my performance-bound Python apps convinces me that
those are a major bottleneck for me.  About a fifth of their time
seems to go into creating the bound method object (reducable by
caching them on the instance)..another fifth into allocating the
memory for the frame object (ameliorated by pymalloc).  As for the
rest, I really don't know.

E