> Probably not with tie, but with function calls in general, sure. We can do
> some flow control analysis on the subs and propagate it outwards so we
> might know, for example, that:
> 
>    sub foo {
>      my (@vars) = @_;
>      return scalar @vars;
>    }
> 
> doesn't change its args or any globals, so can be safely optimized around
> to some extent.

I hate suggesting bad ideas (but I think this may be one), but has any
thought been given to a "pre-compiler" ala Java? 

I know alot of thought is being given to a true compiler, but I'm not
convinced this is feasible. Maybe a pre-compiler that could do some
optimization and then dump the thing off as a ".bpl" (binary perl?)
program. This would still have to be run through the interpreter, but
would be much faster because of pre-optimization. The main difference
between us and Java is that we wouldn't *have* to pre-compile, but only
if speed was crucial (key CGI apps, for example). We already sort of
have hooks for this ability with dump/undump.

Granted, this is probably a really bad idea. Feel free to shoot it down
(my feelings *won't* be hurt). :-)

-Nate

Reply via email to