in reply to Re^6: Perl 5 Optimizing Compiler, Part 5: A Vague Outline Emerges
in thread Perl 5 Optimizing Compiler, Part 5: A Vague Outline Emerges
like tie and overload and AUTOLOAD,
What percentage of Perl code uses those things? 5%? 10%?
What if (can't believe I'm using that phrase), you have two sets of opcodes. The existing one that deals with those things; and another that doesn't. The latter (say) 2 times faster and the former same speed as now.
Does 90%/2 + 10%/1 = 55% mean anything?
Do the decisions about magic have to be made at runtime by every opcode on every scalar?
Or is it possible to decide at (say) sub dispatch time, that none of the args are magical; and the sub does nothing magical to them, so this call to this sub with these parameters can be dispatched to the fast path. And if at any point down the call chain from there, a sub is called that applies magic to an aliased input; or returns a magical return value; then it returns back to the slow path?
|
---|