#!/usr/bin/perl -w use strict; use Benchmark; timethese (1, { bighashcreate => q{ my %hash; my $max_key = 10000000; #10,000,000: 10 million hash keys for (my $i =1; $i<=$max_key; $i++) { $hash{$i}=1; } }, }, ); __END__ On my wimpy Prescott class machine on Windows XP: Benchmark: timing 1 iterations of bighashcreate, bighashcreate: 81 wallclock secs (78.03 usr + 1.84 sys = 79.87 CPU) @ 0.01/s (n=1) On a server class machine under Linux (running as an average user): Benchmark: timing 1 iterations of bighashcreate... bighashcreate: 23 wallclock secs (22.21 usr + 0.91 sys = 23.12 CPU) @ 0.04/s (n=1)