P is for Practical | |
PerlMonks |
Re: what would you like to see in perl5.12?by bennymack (Pilgrim) |
on Aug 21, 2007 at 16:09 UTC ( [id://634120]=note: print w/replies, xml ) | Need Help?? |
How about some way to inline subroutines at compile time. Sort of like other compile-time optimizations but with a little added smarts. "use constant" will currently inline a sub ref which is good and pretty fast. But it seems like it would be even faster to turn the inlined sub ref into a do block.
Wouldn't it be nice if that were turned into this instead?
Update: Added benchmark so people can debunk/prove the need for this. Update: Looks like I had the benchmarks backward and that a sub ref is actually faster than a do block. So, nevermind...
In Section
Meditations
|
|