| Filename | /Users/smash/playground/Parse-Lexer/lexer.pl |
| Statements | Executed 37 statements in 13.0ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 13.4ms | 31.8ms | main::BEGIN@2 |
| 16 | 1 | 1 | 37µs | 37µs | main::CORE:prtf (opcode) |
| 4 | 1 | 1 | 12µs | 12µs | main::CORE:qr (opcode) |
| 0 | 0 | 0 | 0s | 0s | main::RUNTIME |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | |||||
| 2 | 3 | 12.8ms | 1 | 31.8ms | # spent 31.8ms (13.4+18.4) within main::BEGIN@2 which was called:
# once (13.4ms+18.4ms) by main::RUNTIME at line 2 # spent 31.8ms making 1 call to main::BEGIN@2 |
| 3 | |||||
| 4 | 1 | 27µs | 5 | 29µs | my $lexer = Parse::Lexer->new( # spent 17µs making 1 call to Parse::Lexer::new
# spent 12µs making 4 calls to main::CORE:qr, avg 3µs/call |
| 5 | PLUS => qr/\+/, | ||||
| 6 | MINUS => qr/\-/, | ||||
| 7 | NUMBER => qr/[0-9]+/, | ||||
| 8 | IDENT => qr/[a-z]+/, | ||||
| 9 | ); | ||||
| 10 | |||||
| 11 | 1 | 54µs | 16 | 8.83ms | while (my ($token,$value) = $lexer->next) { # spent 8.83ms making 16 calls to Parse::Lexer::next, avg 552µs/call |
| 12 | 16 | 78µs | 16 | 37µs | printf "[%s]", $value; # spent 37µs making 16 calls to main::CORE:prtf, avg 2µs/call |
| 13 | |||||
| 14 | 16 | 12µs | last unless ($token and $value); # XXX | ||
| 15 | } | ||||
| 16 | |||||
# spent 37µs within main::CORE:prtf which was called 16 times, avg 2µs/call:
# 16 times (37µs+0s) by main::RUNTIME at line 12, avg 2µs/call | |||||
# spent 12µs within main::CORE:qr which was called 4 times, avg 3µs/call:
# 4 times (12µs+0s) by main::RUNTIME at line 4, avg 3µs/call |