| Filename | /Users/ap13/perl5/lib/perl5/Heap071/Elem.pm |
| Statements | Executed 20038 statements in 21.2ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 10014 | 2 | 1 | 14.6ms | 14.6ms | Heap071::Elem::heap |
| 1 | 1 | 1 | 20µs | 41µs | Heap071::Elem::BEGIN@3 |
| 1 | 1 | 1 | 13µs | 105µs | Heap071::Elem::BEGIN@4 |
| 0 | 0 | 0 | 0s | 0s | Heap071::Elem::cmp |
| 0 | 0 | 0 | 0s | 0s | Heap071::Elem::new |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Heap071::Elem; | ||||
| 2 | |||||
| 3 | 2 | 49µs | 2 | 62µs | # spent 41µs (20+21) within Heap071::Elem::BEGIN@3 which was called:
# once (20µs+21µs) by Graph::MSTHeapElem::BEGIN@5 at line 3 # spent 41µs making 1 call to Heap071::Elem::BEGIN@3
# spent 21µs making 1 call to strict::import |
| 4 | 2 | 216µs | 2 | 196µs | # spent 105µs (13+92) within Heap071::Elem::BEGIN@4 which was called:
# once (13µs+92µs) by Graph::MSTHeapElem::BEGIN@5 at line 4 # spent 105µs making 1 call to Heap071::Elem::BEGIN@4
# spent 92µs making 1 call to vars::import |
| 5 | |||||
| 6 | 1 | 900ns | require Exporter; | ||
| 7 | 1 | 400ns | require AutoLoader; | ||
| 8 | |||||
| 9 | 1 | 20µs | @ISA = qw(Exporter AutoLoader); | ||
| 10 | |||||
| 11 | # No names exported. | ||||
| 12 | # No names available for export. | ||||
| 13 | |||||
| 14 | 1 | 600ns | @EXPORT = ( ); | ||
| 15 | |||||
| 16 | 1 | 800ns | $VERSION = '0.71'; | ||
| 17 | |||||
| 18 | |||||
| 19 | # Preloaded methods go here. | ||||
| 20 | |||||
| 21 | # new will usually be superceded by child, | ||||
| 22 | # but provide an empty hash as default and | ||||
| 23 | # accept any provided filling for it. | ||||
| 24 | sub new { | ||||
| 25 | my $self = shift; | ||||
| 26 | my $class = ref($self) || $self; | ||||
| 27 | |||||
| 28 | return bless { heap=>undef, @_ }, $class; | ||||
| 29 | } | ||||
| 30 | |||||
| 31 | # spent 14.6ms within Heap071::Elem::heap which was called 10014 times, avg 1µs/call:
# 5007 times (7.69ms+0s) by Heap071::Fibonacci::elem at line 323 of Heap071/Fibonacci.pm, avg 2µs/call
# 5007 times (6.87ms+0s) by Heap071::Fibonacci::extract_top at line 225 of Heap071/Fibonacci.pm, avg 1µs/call | ||||
| 32 | 10014 | 1.28ms | my $self = shift; | ||
| 33 | 10014 | 19.6ms | @_ ? ($self->{heap} = shift) : $self->{heap}; | ||
| 34 | } | ||||
| 35 | |||||
| 36 | sub cmp { | ||||
| 37 | die "This cmp method must be superceded by one that knows how to compare elements." | ||||
| 38 | } | ||||
| 39 | |||||
| 40 | # Autoload methods go after =cut, and are processed by the autosplit program. | ||||
| 41 | |||||
| 42 | 1 | 11µs | 1; | ||
| 43 | __END__ |