#!/usr/bin/perl -w package Foo; use constant CONSTANT => 2; package main; use Benchmark qw(cmpthese); use strict; my $object = bless \(my $dummy), 'Foo'; # Note: I use assignments to avoid the constant in void context # to be optimised away (that would be too fast for Benchmark # to handle (try removing "my $foo =" for fun ;)). cmpthese(-1, { object_method => sub { my $foo = $object->CONSTANT }, class_method => sub { my $foo = Foo->CONSTANT }, direct_sub => sub { my $foo = Foo::CONSTANT } }); __END__ Benchmark: running class_method, direct_sub, object_method, each for at least 1 CPU seconds... class_method: 2 wallclock secs ( 1.07 usr + 0.00 sys = 1.07 CPU) @ 401942.99/s (n=430079) direct_sub: 2 wallclock secs ( 1.16 usr + 0.00 sys = 1.16 CPU) @ 3389792.24/s (n=3932159) object_method: 1 wallclock secs ( 1.14 usr + 0.00 sys = 1.14 CPU) @ 548745.61/s (n=625570) Rate class_method object_method direct_sub class_method 401943/s -- -27% -88% object_method 548746/s 37% -- -84% direct_sub 3389792/s 743% 518% --