8 use MARC::File::USMARC;
10 use Benchmark qw( timethese cmpthese ) ;
12 my $isisdb = shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI';
14 my $isis = Biblio::Isis->new (
19 my $isis_filter = Biblio::Isis->new (
28 my $rows = $isis->count;
30 my $db = OpenIsis::open( $isisdb );
32 print "rows: $rows\n\n";
36 my $r = timethese( -5, {
38 $isis->fetch( $mfn++ % $rows + 1 );
41 $isis->to_hash( $mfn++ % $rows + 1 );
43 Isis_hash_filter => sub {
44 $isis_filter->to_hash( $mfn++ % $rows + 1 );
48 OpenIsis::read( $db, $mfn++ % $rows + 1 );
51 OpenIsis_hash => sub {
52 my $row = OpenIsis::read( $db, $mfn++ % $rows + 1 );
55 foreach my $f (keys %{$row}) {
56 foreach my $v (@{$row->{$f}}) {
57 push @{$rec->{$f}}, OpenIsis::subfields($v);