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) }, } );