At 09:32 AM 8/4/2001 +0200, Arthur Bergman wrote:
>01-08-03 20.43, skrev David L. Nicol på david@kasey.umkc.edu följande:
>
> > Instead of introducing a new keyword, have any sub consisting of
> > only one expression get replaced in the op tree with that expression,
> > instead of a subroutine-calling mechanism. Complex in-place-expandables
> > could be implemented with
>
>Or write a decent optimizer.
The optimizer's not guaranteed to get that decent. That's the trouble with
languages as dynamic as perl--you find yourself unable to safely do a lot
of stuff without extensive analysis, and you may still find you can't be
sure that it's safe.
One quick "*foo = $bar", where $bar's a sub ref, whacks any sort of
optimization you might do with inlining foo. Do it symbolically and it
shoots down *all* inlining, since you can't be sure what was altered.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk
Thread Previous
|
Thread Next