parse-time optimizations

Thomas Wouters thomas at xs4all.net
Wed May 30 11:49:18 EDT 2001


On Wed, May 30, 2001 at 03:26:18PM +0000, jcm wrote:
> Thomas Wouters <thomas at xs4all.net> wrote:
> > On Wed, May 30, 2001 at 01:54:11PM +0000, jcm wrote:
> 
> >> This is an unambiguous situation.  Don't just think of the program
> >> text--these transformations would be done on the parse-tree.  In
> >> Python '+' is left-associative.  We're talking about simple,
> >> well-understood optimizations.  The reason I am advocating these in
> >> particular is because they can be done without heavyweight semantic
> >> analysis.
> 
> > Read back in this thread. Michael Hudson already reported that his
> > bytecodehacks packages already has a module to do constant-folding
> > optimizations. He also says it isn't worth much :) Have you tried it out,
> > yet ?
> 
> I'm not looking for a personal solution.  My intent is to make the
> Python interpreter/compiler better.

But people are telling you it wouldn't be better :) You can use
bytecodehacks to prove to us that it would. It certainly would be a lot more
convincing :)

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list