uSAC-MIME

 view release on metacpan or  search on metacpan

benchmarks/usac.pl  view on Meta::CPAN

use strict;
use warnings;
use uSAC::MIME;
use Benchmark qw<cmpthese>;

use Plack::MIME;
use MIME::Detect;

use feature ":all";

my $db=uSAC::MIME->new->index;

my $detect=MIME::Detect->new;
my $count=$ARGV[0]//10_000_000;


cmpthese($count, {
		usac=>sub { $db->{txt}},
		plack=>sub {Plack::MIME->mime_type("txt")},



( run in 0.251 second using v1.01-cache-2.11-cpan-cba739cd03b )