# keywords: method sub call overhead # learned: OO-style method invocation is only about 13% slower than direct invocation (v5.6) package Foo; use strict; use warnings; use Benchmark qw(cmpthese); sub new { bless {}, shift; } sub meth { my ($self, $val) = @_; $val; } my $obj = new Foo; my @params = (42, 1, 2, { a=> 'silly hashref'}, 'a string'); cmpthese (-3, { method => sub { $obj->meth(@params); }, direct => sub { meth($obj, @params); } });