File: benchmk1.pl

package info (click to toggle)
libbit-vector-perl 7.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,008 kB
  • sloc: perl: 6,703; ansic: 3,654; makefile: 9
file content (37 lines) | stat: -rwxr-xr-x 467 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/local/bin/perl

use Benchmark;

sub init
{
    delete $INC{'Carp.pm'};
    delete $INC{'Exporter.pm'};
    delete $INC{'overload.pm'};
    delete $INC{'Bit/Vector/Overload.pm'};
    delete $INC{'Bit/Vector.pm'};
    delete $INC{'DynaLoader.pm'};
}

sub plain
{
    init();
    require Bit::Vector;
}

sub ovrld
{
    init();
    require Bit::Vector::Overload;
}

timethese
(
    100,
    {
        plain => \&plain,
        ovrld => \&ovrld
    }
);

__END__