← Index
NYTProf Performance Profile   « line view »
For ../dm5dm6_ex3
  Run on Mon Feb 23 08:36:56 2015
Reported on Mon Feb 23 08:37:02 2015

Filename/home/sulbeck/perl-modules/Date-Manip-6.49/internal/benchmarks/notz/../dm5dm6_ex3
StatementsExecuted 2451 statements in 5.70ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
413474111.5ms11.5msTie::Hash::NamedCapture::::FETCHTie::Hash::NamedCapture::FETCH (xsub)
1111.59ms3.67msmain::::BEGIN@10 main::BEGIN@10
1111.43ms1.45msmain::::BEGIN@7 main::BEGIN@7
111913µs913µsmain::::CORE:backtick main::CORE:backtick (opcode)
111192µs215µsmain::::BEGIN@8 main::BEGIN@8
11124µs24µsmain::::CORE:prtf main::CORE:prtf (opcode)
1115µs5µsUNIVERSAL::::VERSION UNIVERSAL::VERSION (xsub)
1113µs3µsversion::::(bool version::(bool (xsub)
1112µs2µsversion::::(cmp version::(cmp (xsub)
4312µs2µsInternals::::SvREADONLY Internals::SvREADONLY (xsub)
2111µs1µsmro::::method_changed_in mro::method_changed_in (xsub)
0000s0smain::::RUNTIME main::RUNTIME
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
011859µsProfile 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
1124µs#!/usr/bin/perl
2
3# Usage: dm5dm6 VERS FILE
4# VERS = 5, 6, 6o
5# FILE = file containing a list of dates
6
721.36ms21.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
use warnings;
# spent 1.45ms making 1 call to main::BEGIN@7 # spent 4µs making 1 call to warnings::import
82194µs2225µs
# spent 215µs (192+23) within main::BEGIN@8 which was called: # once (192µs+23µs) by main::NULL at line 8
use strict;
# spent 215µs making 1 call to main::BEGIN@8 # spent 9µs making 1 call to strict::import
9
102211µs24.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
use Time::HiRes qw / gettimeofday tv_interval /;
# spent 3.67ms making 1 call to main::BEGIN@10 # spent 997µs making 1 call to Time::HiRes::import
11
121800nsmy ($vers,$file) = @ARGV;
13
1411.05ms1913µsmy @dates = `cat $file`;
# spent 913µs making 1 call to main::CORE:backtick
15135µschomp(@dates);
16
171200nsmy $obj;
181800nsif ($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') {
25170µs require Date::Manip::Date;
2614µs13.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
31110µs17µsmy $t0 = [gettimeofday()];
# spent 7µs making 1 call to Time::HiRes::gettimeofday
32
3312µsif ($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) {
3924332.48ms2433675ms $obj->parse($date);
# spent 675ms making 2433 calls to Date::Manip::Date::parse, avg 277µs/call
40 }
41}
42
4316µs12µsmy $t1 = [gettimeofday()];
# spent 2µs making 1 call to Time::HiRes::gettimeofday
4412µs14µsmy $et = tv_interval($t0, $t1)*1000;
# spent 4µs making 1 call to Time::HiRes::tv_interval
45
461250µs124µsprintf(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
sub Internals::SvREADONLY; # xsub
# 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
sub Tie::Hash::NamedCapture::FETCH; # xsub
# spent 5µs within UNIVERSAL::VERSION which was called: # once (5µs+0s) by Encode::BEGIN@12 at line 12 of Encode.pm
sub UNIVERSAL::VERSION; # xsub
# spent 913µs within main::CORE:backtick which was called: # once (913µs+0s) by main::RUNTIME at line 14
sub main::CORE:backtick; # opcode
# spent 24µs within main::CORE:prtf which was called: # once (24µs+0s) by main::RUNTIME at line 46
sub main::CORE:prtf; # opcode
# 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
sub mro::method_changed_in; # xsub
# spent 3µs within version::(bool which was called: # once (3µs+0s) by DynaLoader::BEGIN@22 at line 59 of Config.pm
sub version::(bool; # xsub
# spent 2µs within version::(cmp which was called: # once (2µs+0s) by DynaLoader::BEGIN@22 at line 62 of Config.pm
sub version::(cmp; # xsub