Beefy Boxes and Bandwidth Generously Provided by pair Networks
RobOMonk Problems? Is your data what you think it is?  Comment
on  then the subroutine probably has almost no code in it at
all, and the solution is to inline the tiny amount of code in
the subroutine and remove the calling overhead entirely.  Sure,
you could do that, but are you really going to allow all the
callers of your objects to access their attributes directly
rather than going through getters?  Little bits add up! Here a
25% penalty just to satisfy two pointless P::C rules:  #! perl
-slw use strict; use Benchmark qw[ cmpthese ]; our $o = bless {
X=>1 }, 'main'; sub getX1{ my $self = shift; return $self->{X};
} sub getX2{ return $_[0]->{X}; } sub getX3{ $_[0]->{X}; }
cmpthese -1, { A=> q[ my $x = $o->getX1(); ], B=> q[ my $x =
$o->getX2(); ], C=> q[ my $x = $o->getX3(); ], }; __END__
C:\test>junk19 Rate A B C A 1441709/s -- -11% -20% B 1611352/s
12% -- -10% C 1797147/s 25% 12% --  And that is just one level
deep. Imagine (or test) the affe