Benchmark: running array, hash, softref, each for at least 10 CPU seconds... array: 11 wallclock secs (10.50 usr + 0.00 sys = 10.50 CPU) @ 32119.33/s (n=337253) hash: 11 wallclock secs (10.30 usr + 0.00 sys = 10.30 CPU) @ 22763.50/s (n=234464) softref: 10 wallclock secs (10.39 usr + 0.00 sys = 10.39 CPU) @ 17753.61/s (n=184460) use Benchmark; foreach (1..10) { $hash{$_} = 'x'; $array[$_] = 'x'; ${"var_$_"} = 'x'; } sub hash { $hash{$_} = 'hash!' foreach 1..10 } sub array { $array[$_] = 'array!' foreach 1..10 } sub softref { ${"var_$_"} = 'ref!' foreach 1..10 } timethese(-10, { hash => \&hash, array => \&array, softref => \&softref, });