in reply to Subs created at run-time are faster than those created at compile-time
timethese(50000, { begin => sub { begin() for 1 .. 1000 }, init => sub { "init" for 1 .. 1000 }, declared => sub { declared() for 1 .. 1000 }, runtime => sub { "runtime" for 1 .. 1000 }, });
so I'm not surprised init and runtime are faster. Use use strict; use warnings;!!!
|
|---|