[Types-sig] Re: Py2C speed benefit

Bill Tutt billtut@microsoft.com
Mon, 20 Dec 1999 16:55:14 -0800


> From: Greg Stein [mailto:gstein@lyra.org]
> 
> On Sun, 19 Dec 1999, skaller wrote:
> >...
> 
> > Now, here is something I believe, mainly from comments
> > made at various times by Guido, Tim, and others:
> > people have tried compiling python before, and found that
> > the resulting C code didn't run much faster than the
> > interpreter. Thats mainly because these compilers didn't
> > know anythong about the types, they just generated API
> > calls corresponding to what the byte code interpreter would
> > execute -- and the interpreter is pretty fast already.
> 
> Bill Tutt and I have done it and measured about 30% speed 
> improvement in
> most cases. Not as lot as most people would hope for, but definitely
> there. Bill is continuing to improve the code.
> 

To clarify, this is just an approximate speed improvement in pystone. This
doesn't (as yet) reflect a speed benefit when using typical OOP-like
production code. I'm hoping to eventaully find some time to optimizing
class-based method calls in Py2C.

Bill