in reply to Hash references versus hashes: is there a performance hit?

I'm pretty sure those should turn out to be almost exactly the same. If speed is that important, perhaps you should look at assembly language or C or something? You can always import those routines into perl later using XS.

You could check using Benchmark:

use strict; use Benchmark; my %h = (hrmph => 1); my $h = \%h; timethese( 10_000_000, { lhs => sub { $h{hrmph} }, rhs => sub { $h->{hrmph} }, });

Curiously, $h{hrmph} seems to actually be measurably faster, but by a very tiny amount.

-Paul