# ********** CacheDemo.pl ********** 
use strict;
use Integer;
use HashTable;
use Time::HR;

my $t1 = gethrtime();
my $i;
my $j;
my $hash = HashTable->new();
for ($i=0; $i<10*100*100; $i++) {
  $hash->insert($i,Integer->new($i));
}
for ($i=0; $i<10*100*100; $i++) {
  $j = $hash->find($i);
  #print $j->intValue()."\n";
}
my $t2 = gethrtime();
print (int(($t2-$t1)/1000000))." ";
