if the code inside my_sub operates faster than the my_sub call itself, it's kind of stupid to keep it in a sub, i agree. but let us say that for reasons of software engineering and particular specifications, it is neccessary to keep that little piece of trivial code, in a sub (or a sub reference) is there a way to tell the perl interpreter to either: a) inline the sub (i know, evil C++ thing, it works!) or b) speed it up some OTHER way?sub my_sub($) { ... do something EASY and fast ... } foreach my $i (0 .... $a_bazillion) { my_sub($some_value); }
In reply to method inlineing by eduardo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |