Filename | /home/sulbeck/perl-modules/Date-Manip-6.49/internal/benchmarks/notz/../dm5dm6_ex3 |
Statements | Executed 2451 statements in 5.70ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
41347 | 4 | 1 | 11.5ms | 11.5ms | FETCH (xsub) | Tie::Hash::NamedCapture::
1 | 1 | 1 | 1.59ms | 3.67ms | BEGIN@10 | main::
1 | 1 | 1 | 1.43ms | 1.45ms | BEGIN@7 | main::
1 | 1 | 1 | 913µs | 913µs | CORE:backtick (opcode) | main::
1 | 1 | 1 | 192µs | 215µs | BEGIN@8 | main::
1 | 1 | 1 | 24µs | 24µs | CORE:prtf (opcode) | main::
1 | 1 | 1 | 5µs | 5µs | VERSION (xsub) | UNIVERSAL::
1 | 1 | 1 | 3µs | 3µs | (bool (xsub) | version::
1 | 1 | 1 | 2µs | 2µs | (cmp (xsub) | version::
4 | 3 | 1 | 2µs | 2µs | SvREADONLY (xsub) | Internals::
2 | 1 | 1 | 1µs | 1µs | method_changed_in (xsub) | mro::
0 | 0 | 0 | 0s | 0s | RUNTIME | main::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
0 | 11 | 859µs | Profile data that couldn't be associated with a specific line: # spent 529µs making 2 calls to Date::Manip::Zones::END, avg 264µs/call
# spent 315µs making 2 calls to Date::Manip::TZ::amnew_00::END, avg 157µs/call
# spent 6µs making 2 calls to Date::Manip::TZ::END, avg 3µs/call
# spent 2µs making 1 call to Date::Manip::Delta::END
# spent 2µs making 1 call to Date::Manip::Date::END
# spent 2µs making 1 call to Date::Manip::Obj::END
# spent 2µs making 1 call to Date::Manip::Base::END
# spent 1µs making 1 call to Date::Manip::TZ_Base::END | ||
1 | 1 | 24µs | #!/usr/bin/perl | ||
2 | |||||
3 | # Usage: dm5dm6 VERS FILE | ||||
4 | # VERS = 5, 6, 6o | ||||
5 | # FILE = file containing a list of dates | ||||
6 | |||||
7 | 2 | 1.36ms | 2 | 1.46ms | # spent 1.45ms (1.43+21µs) within main::BEGIN@7 which was called:
# once (1.43ms+21µs) by main::NULL at line 7 # spent 1.45ms making 1 call to main::BEGIN@7
# spent 4µs making 1 call to warnings::import |
8 | 2 | 194µs | 2 | 225µs | # spent 215µs (192+23) within main::BEGIN@8 which was called:
# once (192µs+23µs) by main::NULL at line 8 # spent 215µs making 1 call to main::BEGIN@8
# spent 9µs making 1 call to strict::import |
9 | |||||
10 | 2 | 211µs | 2 | 4.67ms | # spent 3.67ms (1.59+2.07) within main::BEGIN@10 which was called:
# once (1.59ms+2.07ms) by main::NULL at line 10 # spent 3.67ms making 1 call to main::BEGIN@10
# spent 997µs making 1 call to Time::HiRes::import |
11 | |||||
12 | 1 | 800ns | my ($vers,$file) = @ARGV; | ||
13 | |||||
14 | 1 | 1.05ms | 1 | 913µs | my @dates = `cat $file`; # spent 913µs making 1 call to main::CORE:backtick |
15 | 1 | 35µs | chomp(@dates); | ||
16 | |||||
17 | 1 | 200ns | my $obj; | ||
18 | 1 | 800ns | if ($vers eq '5') { | ||
19 | require Date::Manip::DM5; | ||||
20 | Date::Manip::DM5->import(qw(ParseDate)); | ||||
21 | } elsif ($vers eq '6') { | ||||
22 | require Date::Manip::DM6; | ||||
23 | Date::Manip::DM6->import(qw(ParseDate)); | ||||
24 | } elsif ($vers eq '6o') { | ||||
25 | 1 | 70µs | require Date::Manip::Date; | ||
26 | 1 | 4µs | 1 | 3.98ms | $obj = new Date::Manip::Date; # spent 3.98ms making 1 call to Date::Manip::Obj::new |
27 | } else { | ||||
28 | die "ERROR: invalid version\n"; | ||||
29 | } | ||||
30 | |||||
31 | 1 | 10µs | 1 | 7µs | my $t0 = [gettimeofday()]; # spent 7µs making 1 call to Time::HiRes::gettimeofday |
32 | |||||
33 | 1 | 2µs | if ($vers eq '5' || $vers eq '6') { | ||
34 | foreach my $date (@dates) { | ||||
35 | ParseDate($date); | ||||
36 | } | ||||
37 | } elsif ($vers eq '6o') { | ||||
38 | foreach my $date (@dates) { | ||||
39 | 2433 | 2.48ms | 2433 | 675ms | $obj->parse($date); # spent 675ms making 2433 calls to Date::Manip::Date::parse, avg 277µs/call |
40 | } | ||||
41 | } | ||||
42 | |||||
43 | 1 | 6µs | 1 | 2µs | my $t1 = [gettimeofday()]; # spent 2µs making 1 call to Time::HiRes::gettimeofday |
44 | 1 | 2µs | 1 | 4µs | my $et = tv_interval($t0, $t1)*1000; # spent 4µs making 1 call to Time::HiRes::tv_interval |
45 | |||||
46 | 1 | 250µs | 1 | 24µs | printf(STDOUT "Elapsed: %6.3f\n",$et); # spent 24µs making 1 call to main::CORE:prtf |
47 | |||||
48 | # 5 6 6o | ||||
49 | # dateset3.txt 857.250 2246.340 2090.676 | ||||
50 | # _notz 683.084 462.898 431.781 | ||||
# spent 2µs within Internals::SvREADONLY which was called 4 times, avg 400ns/call:
# 2 times (900ns+0s) by constant::import at line 149 of constant.pm, avg 450ns/call
# once (600ns+0s) by constant::BEGIN@24 at line 32 of constant.pm
# once (100ns+0s) by constant::BEGIN@24 at line 33 of constant.pm | |||||
# spent 11.5ms within Tie::Hash::NamedCapture::FETCH which was called 41347 times, avg 278ns/call:
# 24360 times (6.43ms+0s) by Date::Manip::Date::_parse_time at line 1633 of Date/Manip/Date.pm, avg 264ns/call
# 12150 times (3.49ms+0s) by Date::Manip::Date::_parse_date_common at line 1698 of Date/Manip/Date.pm, avg 287ns/call
# 2436 times (508µs+0s) by Date::Manip::Date::_parse_date at line 431 of Date/Manip/Date.pm, avg 209ns/call
# 2401 times (1.08ms+0s) by Date::Manip::Date::_parse_dow at line 1738 of Date/Manip/Date.pm, avg 448ns/call | |||||
# spent 5µs within UNIVERSAL::VERSION which was called:
# once (5µs+0s) by Encode::BEGIN@12 at line 12 of Encode.pm | |||||
# spent 913µs within main::CORE:backtick which was called:
# once (913µs+0s) by main::RUNTIME at line 14 | |||||
# spent 24µs within main::CORE:prtf which was called:
# once (24µs+0s) by main::RUNTIME at line 46 | |||||
# spent 1µs within mro::method_changed_in which was called 2 times, avg 550ns/call:
# 2 times (1µs+0s) by constant::import at line 182 of constant.pm, avg 550ns/call | |||||
# spent 3µs within version::(bool which was called:
# once (3µs+0s) by DynaLoader::BEGIN@22 at line 59 of Config.pm | |||||
# spent 2µs within version::(cmp which was called:
# once (2µs+0s) by DynaLoader::BEGIN@22 at line 62 of Config.pm |