use Benchmark qw(cmpthese); package Example { sub new { bless {}, __PACKAGE__ } sub method { } } my $obj = Example->new; my $meth = 'method'; cmpthese(-1, { direct => sub { $obj->method }, var => sub { $obj->$meth }, ref => sub { $obj->${\'method'} }, can => sub { $obj->can('method')->($obj) }, magic => sub { ${ref($obj) . '::'}{'method'}->($obj) }, } ); #### Rate magic can ref var direct magic 3495252/s -- -0% -37% -41% -58% can 3510857/s 0% -- -36% -40% -58% ref 5518821/s 58% 57% -- -6% -34% var 5887725/s 68% 68% 7% -- -29% direct 8340945/s 139% 138% 51% 42% --