Profile of examples/benchmark4.pl

← Index
NYTProf Performance Profile «line view»
For examples/benchmark4.pl
Run on Thu Aug 28 19:01:43 2014
Reported on Thu Aug 28 19:02:42 2014

Filename | /home/rdrake/code/netaddr-ip-fastnew/examples/benchmark4.pl
Statements | Executed 1413715 statements in 3.95s

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
527528 | 17 | 17 | 1.48s | 3.49s | main::::__ANON__[examples/benchmark4.pl:10] main::__ANON__[examples/benchmark4.pl:10]
432500 | 17 | 17 | 1.24s | 3.33s | main::::__ANON__[examples/benchmark4.pl:12] main::__ANON__[examples/benchmark4.pl:12]
405857 | 17 | 17 | 1.12s | 3.52s | main::::__ANON__[examples/benchmark4.pl:11] main::__ANON__[examples/benchmark4.pl:11]
47817 | 14 | 14 | 248ms | 3.18s | main::::__ANON__[examples/benchmark4.pl:9] main::__ANON__[examples/benchmark4.pl:9]
1 | 1 | 1 | 3.56ms | 3.59ms | main::::BEGIN@2 main::BEGIN@2
1 | 1 | 1 | 3.49ms | 12.8ms | main::::BEGIN@3 main::BEGIN@3
1 | 1 | 1 | 1.39ms | 24.9ms | main::::BEGIN@5 main::BEGIN@5
1 | 1 | 1 | 604µs | 668µs | main::::BEGIN@1 main::BEGIN@1
1 | 1 | 1 | 533µs | 634µs | main::::BEGIN@4 main::BEGIN@4
15 | 15 | 3 | 27µs | 27µs | main::::CORE:pack main::CORE:pack (opcode)
3 | 3 | 2 | 27µs | 27µs | UNIVERSAL::::VERSIONUNIVERSAL::VERSION (xsub)
1 | 1 | 1 | 7µs | 70µs | main::::BEGIN@6 main::BEGIN@6
1 | 1 | 1 | 6µs | 6µs | version::::(bool version::(bool (xsub)
1 | 1 | 1 | 6µs | 6µs | version::::(cmp version::(cmp (xsub)
3 | 1 | 1 | 4µs | 4µs | UNIVERSAL::::isaUNIVERSAL::isa (xsub)
0 | 0 | 0 | 0s | 0s | main::::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
--- | --- | --- | --- | --- | ---
1 | 2 | 563µs | 2 | 693µs | # spent 668µs (604+63) within main::BEGIN@1 which was called: # once (604µs+63µs) by main::RUNTIME at line 1 use strict; # spent 668µs making 1 call to main::BEGIN@1 # spent 25µs making 1 call to strict::import
2 | 2 | 3.48ms | 2 | 3.60ms | # spent 3.59ms (3.56+24µs) within main::BEGIN@2 which was called: # once (3.56ms+24µs) by main::RUNTIME at line 2 use warnings; # spent 3.59ms making 1 call to main::BEGIN@2 # spent 8µs making 1 call to warnings::import
3 | 2 | 108µs | 2 | 13.0ms | # spent 12.8ms (3.49+9.35) within main::BEGIN@3 which was called: # once (3.49ms+9.35ms) by main::RUNTIME at line 3 use Benchmark qw( cmpthese timethese ); # spent 12.8ms making 1 call to main::BEGIN@3 # spent 112µs making 1 call to Benchmark::import
4 | 2 | 107µs | 2 | 687µs | # spent 634µs (533+101) within main::BEGIN@4 which was called: # once (533µs+101µs) by main::RUNTIME at line 4 use lib './lib'; # spent 634µs making 1 call to main::BEGIN@4 # spent 53µs making 1 call to lib::import
5 | 2 | 145µs | 1 | 24.9ms | # spent 24.9ms (1.39+23.5) within main::BEGIN@5 which was called: # once (1.39ms+23.5ms) by main::RUNTIME at line 5 use NetAddr::IP::FastNew; # spent 24.9ms making 1 call to main::BEGIN@5
6 | 2 | 184µs | 2 | 133µs | # spent 70µs (7+63) within main::BEGIN@6 which was called: # once (7µs+63µs) by main::RUNTIME at line 6 use NetAddr::IP; # spent 70µs making 1 call to main::BEGIN@6 # spent 63µs making 1 call to NetAddr::IP::import
7 |  |  |  |  |
8 |  |  |  |  | cmpthese(-3, {
9 | 47817 | 144ms | 47817 | 86.4ms | # spent 3.18s (248ms+2.94) within main::__ANON__[examples/benchmark4.pl:9] which was called 47817 times, avg 67µs/call: # 39690 times (205ms+2.45s) by Benchmark::__ANON__[(eval 34)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 33)[Benchmark.pm:646], avg 67µs/call # 4032 times (24.2ms+245ms) by Benchmark::__ANON__[(eval 32)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 31)[Benchmark.pm:646], avg 67µs/call # 2048 times (9.43ms+124ms) by Benchmark::__ANON__[(eval 30)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 29)[Benchmark.pm:646], avg 65µs/call # 1024 times (4.70ms+62.4ms) by Benchmark::__ANON__[(eval 28)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 27)[Benchmark.pm:646], avg 66µs/call # 512 times (2.35ms+31.8ms) by Benchmark::__ANON__[(eval 26)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 25)[Benchmark.pm:646], avg 67µs/call # 256 times (1.18ms+13.0ms) by Benchmark::__ANON__[(eval 24)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 23)[Benchmark.pm:646], avg 55µs/call # 128 times (580µs+6.53ms) by Benchmark::__ANON__[(eval 22)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 21)[Benchmark.pm:646], avg 56µs/call # 64 times (296µs+3.22ms) by Benchmark::__ANON__[(eval 20)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 19)[Benchmark.pm:646], avg 55µs/call # 32 times (149µs+1.64ms) by Benchmark::__ANON__[(eval 18)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 17)[Benchmark.pm:646], avg 56µs/call # 16 times (74µs+826µs) by Benchmark::__ANON__[(eval 16)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 15)[Benchmark.pm:646], avg 56µs/call # 8 times (39µs+436µs) by Benchmark::__ANON__[(eval 14)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 13)[Benchmark.pm:646], avg 59µs/call # 4 times (20µs+221µs) by Benchmark::__ANON__[(eval 12)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 11)[Benchmark.pm:646], avg 60µs/call # 2 times (11µs+118µs) by Benchmark::__ANON__[(eval 10)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 9)[Benchmark.pm:646], avg 64µs/call # once (11µs+66µs) by Benchmark::__ANON__[(eval 8)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 7)[Benchmark.pm:646] 'NetAddr_IP' => sub { NetAddr::IP->new("127.0.0.1"); }, # spent 86.4ms making 47817 calls to NetAddr::IP::Lite::new, avg 2µs/call
10 | 527528 | 1.46s | 527528 | 2.01s | # spent 3.49s (1.48+2.01) within main::__ANON__[examples/benchmark4.pl:10] which was called 527528 times, avg 7µs/call: # 447844 times (1.25s+1.71s) by Benchmark::__ANON__[(eval 68)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 67)[Benchmark.pm:646], avg 7µs/call # 46917 times (131ms+180ms) by Benchmark::__ANON__[(eval 66)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 33)[Benchmark.pm:646], avg 7µs/call # 16384 times (43.8ms+61.2ms) by Benchmark::__ANON__[(eval 64)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 63)[Benchmark.pm:646], avg 6µs/call # 8192 times (24.8ms+31.5ms) by Benchmark::__ANON__[(eval 62)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 61)[Benchmark.pm:646], avg 7µs/call # 4096 times (12.8ms+13.7ms) by Benchmark::__ANON__[(eval 60)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 59)[Benchmark.pm:646], avg 6µs/call # 2048 times (6.23ms+6.80ms) by Benchmark::__ANON__[(eval 58)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 29)[Benchmark.pm:646], avg 6µs/call # 1024 times (2.08ms+3.39ms) by Benchmark::__ANON__[(eval 56)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 27)[Benchmark.pm:646], avg 5µs/call # 512 times (1.05ms+1.72ms) by Benchmark::__ANON__[(eval 54)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 25)[Benchmark.pm:646], avg 5µs/call # 256 times (519µs+852µs) by Benchmark::__ANON__[(eval 52)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 23)[Benchmark.pm:646], avg 5µs/call # 128 times (262µs+438µs) by Benchmark::__ANON__[(eval 50)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 21)[Benchmark.pm:646], avg 5µs/call # 64 times (130µs+216µs) by Benchmark::__ANON__[(eval 48)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 19)[Benchmark.pm:646], avg 5µs/call # 32 times (67µs+113µs) by Benchmark::__ANON__[(eval 46)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 17)[Benchmark.pm:646], avg 6µs/call # 16 times (34µs+57µs) by Benchmark::__ANON__[(eval 44)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 15)[Benchmark.pm:646], avg 6µs/call # 8 times (17µs+31µs) by Benchmark::__ANON__[(eval 42)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 13)[Benchmark.pm:646], avg 6µs/call # 4 times (10µs+18µs) by Benchmark::__ANON__[(eval 40)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 11)[Benchmark.pm:646], avg 7µs/call # 2 times (6µs+11µs) by Benchmark::__ANON__[(eval 38)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 9)[Benchmark.pm:646], avg 8µs/call # once (6µs+17µs) by Benchmark::__ANON__[(eval 36)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 7)[Benchmark.pm:646] 'NetAddr_IP_FastNew_new_ipv4' => sub { NetAddr::IP::FastNew->new_ipv4("127.0.0.1"); }, # spent 2.01s making 527528 calls to NetAddr::IP::FastNew::new_ipv4, avg 4µs/call
11 | 405857 | 1.10s | 405857 | 2.41s | # spent 3.52s (1.12+2.41) within main::__ANON__[examples/benchmark4.pl:11] which was called 405857 times, avg 9µs/call: # 338684 times (941ms+1.99s) by Benchmark::__ANON__[(eval 136)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 135)[Benchmark.pm:646], avg 9µs/call # 34406 times (89.4ms+207ms) by Benchmark::__ANON__[(eval 134)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 133)[Benchmark.pm:646], avg 9µs/call # 16384 times (44.7ms+102ms) by Benchmark::__ANON__[(eval 132)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 63)[Benchmark.pm:646], avg 9µs/call # 8192 times (21.7ms+53.5ms) by Benchmark::__ANON__[(eval 130)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 61)[Benchmark.pm:646], avg 9µs/call # 4096 times (8.80ms+30.6ms) by Benchmark::__ANON__[(eval 128)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 59)[Benchmark.pm:646], avg 10µs/call # 2048 times (6.35ms+10.2ms) by Benchmark::__ANON__[(eval 126)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 29)[Benchmark.pm:646], avg 8µs/call # 1024 times (2.19ms+7.40ms) by Benchmark::__ANON__[(eval 124)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 27)[Benchmark.pm:646], avg 9µs/call # 512 times (1.11ms+2.56ms) by Benchmark::__ANON__[(eval 122)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 25)[Benchmark.pm:646], avg 7µs/call # 256 times (2.74ms+1.29ms) by Benchmark::__ANON__[(eval 120)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 23)[Benchmark.pm:646], avg 16µs/call # 128 times (272µs+638µs) by Benchmark::__ANON__[(eval 118)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 21)[Benchmark.pm:646], avg 7µs/call # 64 times (135µs+321µs) by Benchmark::__ANON__[(eval 116)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 19)[Benchmark.pm:646], avg 7µs/call # 32 times (69µs+164µs) by Benchmark::__ANON__[(eval 114)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 17)[Benchmark.pm:646], avg 7µs/call # 16 times (35µs+86µs) by Benchmark::__ANON__[(eval 112)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 15)[Benchmark.pm:646], avg 8µs/call # 8 times (18µs+45µs) by Benchmark::__ANON__[(eval 110)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 13)[Benchmark.pm:646], avg 8µs/call # 4 times (10µs+24µs) by Benchmark::__ANON__[(eval 108)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 11)[Benchmark.pm:646], avg 9µs/call # 2 times (5µs+14µs) by Benchmark::__ANON__[(eval 106)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 9)[Benchmark.pm:646], avg 10µs/call # once (5µs+12µs) by Benchmark::__ANON__[(eval 104)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 7)[Benchmark.pm:646] 'NetAddr_IP_FastNew_new_ipv4_mask' => sub { NetAddr::IP::FastNew->new_ipv4_mask("127.0.0.0", '255.255.255.0'); }, # spent 2.41s making 405857 calls to NetAddr::IP::FastNew::new_ipv4_mask, avg 6µs/call
12 | 432500 | 1.23s | 432500 | 2.09s | # spent 3.33s (1.24+2.09) within main::__ANON__[examples/benchmark4.pl:12] which was called 432500 times, avg 8µs/call: # 362870 times (1.04s+1.76s) by Benchmark::__ANON__[(eval 102)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 101)[Benchmark.pm:646], avg 8µs/call # 36863 times (107ms+177ms) by Benchmark::__ANON__[(eval 100)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 99)[Benchmark.pm:646], avg 8µs/call # 16384 times (46.4ms+80.7ms) by Benchmark::__ANON__[(eval 98)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 63)[Benchmark.pm:646], avg 8µs/call # 8192 times (24.4ms+40.4ms) by Benchmark::__ANON__[(eval 96)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 61)[Benchmark.pm:646], avg 8µs/call # 4096 times (11.1ms+19.9ms) by Benchmark::__ANON__[(eval 94)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 59)[Benchmark.pm:646], avg 8µs/call # 2048 times (6.53ms+8.86ms) by Benchmark::__ANON__[(eval 92)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 29)[Benchmark.pm:646], avg 8µs/call # 1024 times (2.24ms+6.59ms) by Benchmark::__ANON__[(eval 90)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 27)[Benchmark.pm:646], avg 9µs/call # 512 times (3.27ms+2.25ms) by Benchmark::__ANON__[(eval 88)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 25)[Benchmark.pm:646], avg 11µs/call # 256 times (559µs+1.13ms) by Benchmark::__ANON__[(eval 86)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 23)[Benchmark.pm:646], avg 7µs/call # 128 times (279µs+566µs) by Benchmark::__ANON__[(eval 84)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 21)[Benchmark.pm:646], avg 7µs/call # 64 times (142µs+289µs) by Benchmark::__ANON__[(eval 82)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 19)[Benchmark.pm:646], avg 7µs/call # 32 times (70µs+145µs) by Benchmark::__ANON__[(eval 80)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 17)[Benchmark.pm:646], avg 7µs/call # 16 times (36µs+76µs) by Benchmark::__ANON__[(eval 78)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 15)[Benchmark.pm:646], avg 7µs/call # 8 times (19µs+40µs) by Benchmark::__ANON__[(eval 76)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 13)[Benchmark.pm:646], avg 7µs/call # 4 times (10µs+23µs) by Benchmark::__ANON__[(eval 74)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 11)[Benchmark.pm:646], avg 8µs/call # 2 times (6µs+14µs) by Benchmark::__ANON__[(eval 72)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 9)[Benchmark.pm:646], avg 10µs/call # once (6µs+15µs) by Benchmark::__ANON__[(eval 70)[/usr/share/perl/5.18/Benchmark.pm:646]:1] at line 1 of (eval 7)[Benchmark.pm:646] 'NetAddr_IP_FastNew_new_ipv4_cidr' => sub { NetAddr::IP::FastNew->new_ipv4_cidr('127.0.0.0/24'); }, # spent 2.09s making 432500 calls to NetAddr::IP::FastNew::new_ipv4_cidr, avg 5µs/call
13 | 1 | 10µs | 1 | 22.7s | }); # spent 22.7s making 1 call to Benchmark::cmpthese
|  |  |  |  | # spent 27µs within UNIVERSAL::VERSION which was called 3 times, avg 9µs/call: # once (10µs+0s) by NetAddr::IP::BEGIN@8 at line 8 of NetAddr/IP.pm # once (9µs+0s) by NetAddr::IP::BEGIN@9 at line 21 of NetAddr/IP.pm # once (8µs+0s) by NetAddr::IP::FastNew::BEGIN@7 at line 7 of lib/NetAddr/IP/FastNew.pm sub UNIVERSAL::VERSION; # xsub
|  |  |  |  | # spent 4µs within UNIVERSAL::isa which was called 3 times, avg 1µs/call: # 3 times (4µs+0s) by base::import at line 73 of base.pm, avg 1µs/call sub UNIVERSAL::isa; # xsub
|  |  |  |  | # spent 27µs within main::CORE:pack which was called 15 times, avg 2µs/call: # once (11µs+0s) by NetAddr::IP::Lite::BEGIN@9 at line 244 of NetAddr/IP/InetBase.pm # once (2µs+0s) by NetAddr::IP::BEGIN@8 at line 427 of NetAddr/IP/Lite.pm # once (2µs+0s) by NetAddr::IP::BEGIN@8 at line 688 of NetAddr/IP/Lite.pm # once (2µs+0s) by NetAddr::IP::Lite::BEGIN@9 at line 256 of NetAddr/IP/InetBase.pm # once (2µs+0s) by NetAddr::IP::BEGIN@8 at line 1407 of NetAddr/IP/Lite.pm # once (2µs+0s) by NetAddr::IP::Lite::BEGIN@18 at line 153 of NetAddr/IP/Util.pm # once (1µs+0s) by NetAddr::IP::BEGIN@8 at line 197 of NetAddr/IP/Lite.pm # once (1µs+0s) by NetAddr::IP::Lite::BEGIN@18 at line 200 of NetAddr/IP/Util.pm # once (1µs+0s) by NetAddr::IP::BEGIN@8 at line 202 of NetAddr/IP/Lite.pm # once (900ns+0s) by NetAddr::IP::BEGIN@8 at line 198 of NetAddr/IP/Lite.pm # once (900ns+0s) by NetAddr::IP::Lite::BEGIN@9 at line 245 of NetAddr/IP/InetBase.pm # once (800ns+0s) by NetAddr::IP::Lite::BEGIN@18 at line 201 of NetAddr/IP/Util.pm # once (800ns+0s) by NetAddr::IP::BEGIN@8 at line 690 of NetAddr/IP/Lite.pm # once (800ns+0s) by NetAddr::IP::BEGIN@8 at line 689 of NetAddr/IP/Lite.pm # once (700ns+0s) by NetAddr::IP::BEGIN@8 at line 200 of NetAddr/IP/Lite.pm sub main::CORE:pack; # opcode
|  |  |  |  | # spent 6µs within version::(bool which was called: # once (6µs+0s) by DynaLoader::BEGIN@21 at line 59 of Config.pm sub version::(bool; # xsub
|  |  |  |  | # spent 6µs within version::(cmp which was called: # once (6µs+0s) by DynaLoader::BEGIN@21 at line 62 of Config.pm sub version::(cmp; # xsub