Filename | /Users/ap13/perl5/lib/perl5/Graph/SPTHeapElem.pm |
Statements | Executed 10 statements in 375µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 22µs | 47µs | BEGIN@3 | Graph::SPTHeapElem::
1 | 1 | 1 | 14µs | 96µs | BEGIN@4 | Graph::SPTHeapElem::
1 | 1 | 1 | 14µs | 124µs | BEGIN@7 | Graph::SPTHeapElem::
1 | 1 | 1 | 14µs | 40µs | BEGIN@5 | Graph::SPTHeapElem::
0 | 0 | 0 | 0s | 0s | cmp | Graph::SPTHeapElem::
0 | 0 | 0 | 0s | 0s | new | Graph::SPTHeapElem::
0 | 0 | 0 | 0s | 0s | val | Graph::SPTHeapElem::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Graph::SPTHeapElem; | ||||
2 | |||||
3 | 2 | 49µs | 2 | 72µs | # spent 47µs (22+25) within Graph::SPTHeapElem::BEGIN@3 which was called:
# once (22µs+25µs) by Graph::BEGIN@35 at line 3 # spent 47µs making 1 call to Graph::SPTHeapElem::BEGIN@3
# spent 25µs making 1 call to strict::import |
4 | 2 | 61µs | 2 | 178µs | # spent 96µs (14+82) within Graph::SPTHeapElem::BEGIN@4 which was called:
# once (14µs+82µs) by Graph::BEGIN@35 at line 4 # spent 96µs making 1 call to Graph::SPTHeapElem::BEGIN@4
# spent 82µs making 1 call to vars::import |
5 | 2 | 41µs | 2 | 65µs | # spent 40µs (14+26) within Graph::SPTHeapElem::BEGIN@5 which was called:
# once (14µs+26µs) by Graph::BEGIN@35 at line 5 # spent 40µs making 1 call to Graph::SPTHeapElem::BEGIN@5
# spent 26µs making 1 call to Exporter::import |
6 | |||||
7 | 2 | 219µs | 2 | 233µs | # spent 124µs (14+109) within Graph::SPTHeapElem::BEGIN@7 which was called:
# once (14µs+109µs) by Graph::BEGIN@35 at line 7 # spent 124µs making 1 call to Graph::SPTHeapElem::BEGIN@7
# spent 109µs making 1 call to base::import |
8 | |||||
9 | 1 | 600ns | $VERSION = 0.01; | ||
10 | |||||
11 | sub new { | ||||
12 | my $class = shift; | ||||
13 | bless { u => $_[0], v => $_[1], w => $_[2] }, $class; | ||||
14 | } | ||||
15 | |||||
16 | sub cmp { | ||||
17 | ($_[0]->{ w } || 0) <=> ($_[1]->{ w } || 0) || | ||||
18 | ($_[0]->{ u } cmp $_[1]->{ u }) || | ||||
19 | ($_[0]->{ u } cmp $_[1]->{ v }); | ||||
20 | } | ||||
21 | |||||
22 | sub val { | ||||
23 | @{ $_[0] }{ qw(u v w) }; | ||||
24 | } | ||||
25 | |||||
26 | 1 | 5µs | 1; |