Probably not. Subs can be slow because it's expensive to create, initialize, and enter a new lexical scope in Perl 5's internal stack-based system. Inlining is tricky because you still have to respect that lexical scoping -- and I doubt you'll get very much of a speed benefit because, in all but the simplest cases, you still have to pay the price of the ENTER/LEAVE ops.
You'll avoid the cost of sub dispatch and you might have better code coherency (though it'll depend on where the stash is located), but I'm not convinced you'll see dramatic benefits.
It'd probably be better to make ENTER/LEAVE faster than to treat the symptom.
|