Created
July 17, 2014 03:08
-
-
Save smly/c15d048faaceb356a1bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use Benchmark qw(:all); | |
use Digest::MurmurHash3::PurePerl; | |
use Digest::MurmurHash3; | |
my $count = 1e7; | |
cmpthese($count, { | |
'Digest::MurmurHash3::PurePerl' => sub { Digest::MurmurHash3::PurePerl::murmur32('this is a test. ignore me.') }, | |
'Digest::MurmurHash3' => sub { Digest::MurmurHash3::murmur32('this is a test. ignore me.') }, | |
}); | |
__END__ | |
$ perl benchmark_murmurhash.pl | |
Rate Digest::MurmurHash3::PurePerl Digest::MurmurHash3 | |
Digest::MurmurHash3::PurePerl 53596/s -- -99% | |
Digest::MurmurHash3 8849558/s 16412% -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment