#!/usr/bin/perl use strict; use warnings; use Benchmark qw/cmpthese/; my %hash; my $key="foo"; cmpthese (-10, {    ohne  => sub { $hash{$key}=0; $hash{$key}++ for 0 .. 1_000_000; },    mit   => sub { $hash{"$key"}=0; $hash{"$key"}++ for 0 .. 1_000_000; }, });