in reply to Inlining method/function calls?

Inlining method calls is impossible since they're determined at runtime - you need to know what kind of object $foo is before you know what $foo->method means.

You need the kind of typing hints that Perl6 will be giving us before you can do this sort of optimisation. Sorry :-)

Replies are listed 'Best First'.
Re: Re: Inlining method/function calls?
by diotalevi (Canon) on Jul 26, 2003 at 23:01 UTC

    Ok, assume I'm willing to promise that the method / function won't change. In this case the method call was hardcoded in and can't change - I already circumvent perl's normal flexiblity.

      A source filter would seem the only solution in Perl5 - or, if you want something quick and dirty, using CPP via the -P command switch.