Skip to content

Instantly share code, notes, and snippets.

@wolfsage
Created November 26, 2012 13:31
Show Gist options
  • Save wolfsage/4148218 to your computer and use it in GitHub Desktop.
Save wolfsage/4148218 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Shareable;
my %hash;
my $t = tie %hash, 'IPC::Shareable';
#$t->shlock;
print "Filling\n";
for (1..6000) {
$hash{$_} = 1;
}
print "Done\n";
my @fast = (sort {$hash{$a} <=> $hash{$b}} keys %hash)[0..9];
print join(',', @fast);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment