Is this an option?
my $can = $obj->can('method'); cmpthese(-1, { direct => sub { $obj->method }, can2 => sub { $can->($obj) }, } ); __END__ Rate direct can2 direct 15259941/s -- -21% can2 19276812/s 26% --
In reply to Re: Optimizing non-alphanumeric method calls
by Anonymous Monk
in thread Optimizing non-alphanumeric method calls
by trizen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |