At 08:44 PM 11/7/2001 +0100, Bart Schuller wrote: >On Wed, Nov 07, 2001 at 07:12:40AM -0600, Dave Goehrig wrote: > > I brought up the whole low level integer rewrite stuff above, because > > look at it again. That is eactly what we are meant to do when we know > > it is safe to optimize a variable to a more limited domain than say > > 'scalar'. We don't even go through the motions of vtables. > >I've been thinking of the same things. It's no use writing a good >optimizer for a register machine if every variable you have could be >magically tied and execute a redefinetheworld on read.
Believe me, the irony of designing an architecture that potentially allows for a nice set of optimizations that runs languages that you can't optimize has not been lost on me. :) FWIW, most folks won't even know, since the current compile-and-go scheme leaves very little time, by default, for optimization. >So I'd hope there will be a way to say (at the Perl6 language level) >that this variable $foo is really a plain int. I'm hoping so as well. >It's also important to know that there are no unforeseen aliases for a >variable (like $bar = \$foo), but I don't know how one could specify >that, if at all. You can't, the best you can do is a lot of analysis on subroutines and optimize in the few places you can. It makes optimization a lot more expensive, since you need to do a lot of dataflow analysis and carry around a lot of information on subroutines and things. It's doable, and a subset of perl programs will be able to be aggressively optimized. How small that subset is, of course, is up in the air. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk