in reply to Perl keyword like the C/C++ keyword 'inline'

Even in *C* inline rarely gives a significant speedup these days. If your code is running too slowly, then the first two things to look at are, in my experience:

For the former, something like Memoize is a good drop-in tool, although you can generally do better with code tailored specifically to what you're doing (but at the cost of having to write the damned code and debug it yourself).