Profile of Scalar/Util.pm

← Index
NYTProf Performance Profile «line view»
For t/optimization.t
Run on Thu Jan 8 22:47:42 2015
Reported on Thu Jan 8 22:48:05 2015

Filename | /home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/x86_64-linux/Scalar/Util.pm
Statements | Executed 13 statements in 387µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
321 | 6 | 5 | 163µs | 163µs | Scalar::Util::::reftypeScalar::Util::reftype (xsub)
153 | 6 | 2 | 106µs | 106µs | Scalar::Util::::refaddrScalar::Util::refaddr (xsub)
42 | 5 | 3 | 36µs | 36µs | Scalar::Util::::blessedScalar::Util::blessed (xsub)
28 | 2 | 1 | 31µs | 31µs | Scalar::Util::::weakenScalar::Util::weaken (xsub)
1 | 1 | 1 | 22µs | 38µs | Scalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
0 | 0 | 0 | 0s | 0s | Scalar::Util::::export_failScalar::Util::export_fail

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | # Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved.
2 |  |  |  |  | # This program is free software; you can redistribute it and/or
3 |  |  |  |  | # modify it under the same terms as Perl itself.
4 |  |  |  |  | #
5 |  |  |  |  | # Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk>
6 |  |  |  |  |
7 |  |  |  |  | package Scalar::Util;
8 |  |  |  |  |
9 | 2 | 253µs | 2 | 54µs | # spent 38µs (22+16) within Scalar::Util::BEGIN@9 which was called: # once (22µs+16µs) by Test::Deep::Cache::Simple::BEGIN@7 at line 9 use strict; # spent 38µs making 1 call to Scalar::Util::BEGIN@9 # spent 16µs making 1 call to strict::import
10 | 1 | 700ns |  |  | require Exporter;
11 | 1 | 90µs |  |  | require List::Util; # List::Util loads the XS
12 |  |  |  |  |
13 | 1 | 7µs |  |  | our @ISA = qw(Exporter);
14 | 1 | 3µs |  |  | our @EXPORT_OK = qw(
15 |  |  |  |  | blessed refaddr reftype weaken unweaken isweak
16 |  |  |  |  |
17 |  |  |  |  | dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted
18 |  |  |  |  | );
19 | 1 | 300ns |  |  | our $VERSION = "1.38";
20 | 1 | 23µs |  |  | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval
21 |  |  |  |  |
22 | 1 | 300ns |  |  | our @EXPORT_FAIL;
23 |  |  |  |  |
24 | 1 | 600ns |  |  | unless (defined &weaken) {
25 |  |  |  |  | push @EXPORT_FAIL, qw(weaken);
26 |  |  |  |  | }
27 | 1 | 200ns |  |  | unless (defined &isweak) {
28 |  |  |  |  | push @EXPORT_FAIL, qw(isweak isvstring);
29 |  |  |  |  | }
30 | 1 | 100ns |  |  | unless (defined &isvstring) {
31 |  |  |  |  | push @EXPORT_FAIL, qw(isvstring);
32 |  |  |  |  | }
33 |  |  |  |  |
34 |  |  |  |  | sub export_fail {
35 |  |  |  |  | if (grep { /^(?:weaken|isweak)$/ } @_ ) {
36 |  |  |  |  | require Carp;
37 |  |  |  |  | Carp::croak("Weak references are not implemented in the version of perl");
38 |  |  |  |  | }
39 |  |  |  |  |
40 |  |  |  |  | if (grep { /^isvstring$/ } @_ ) {
41 |  |  |  |  | require Carp;
42 |  |  |  |  | Carp::croak("Vstrings are not implemented in the version of perl");
43 |  |  |  |  | }
44 |  |  |  |  |
45 |  |  |  |  | @_;
46 |  |  |  |  | }
47 |  |  |  |  |
48 | 1 | 8µs |  |  | 1;
49 |  |  |  |  |
50 |  |  |  |  | __END__
|  |  |  |  | # spent 36µs within Scalar::Util::blessed which was called 42 times, avg 869ns/call: # 18 times (18µs+0s) by Test::Deep::wrap at line 362 of Test/Deep.pm, avg 972ns/call # 18 times (15µs+0s) by Test::Deep::descend at line 291 of Test/Deep.pm, avg 844ns/call # 2 times (2µs+0s) by Test::Deep::Ref::test_class at line 17 of Test/Deep/Ref.pm, avg 750ns/call # 2 times (1µs+0s) by Test::Deep::class_base at line 410 of Test/Deep.pm, avg 600ns/call # 2 times (1µs+0s) by Test::Deep::Blessed::descend at line 25 of Test/Deep/Blessed.pm, avg 550ns/call sub Scalar::Util::blessed; # xsub
|  |  |  |  | # spent 106µs within Scalar::Util::refaddr which was called 153 times, avg 695ns/call: # 108 times (66µs+0s) by Test::Deep::Cache::Simple::fn_get_key at line 79 of Test/Deep/Cache/Simple.pm, avg 612ns/call # 14 times (14µs+0s) by Test::Deep::descend at line 312 of Test/Deep.pm, avg 979ns/call # 14 times (11µs+0s) by Test::Deep::descend at line 337 of Test/Deep.pm, avg 764ns/call # 14 times (9µs+0s) by Test::Deep::descend at line 313 of Test/Deep.pm, avg 643ns/call # 2 times (2µs+0s) by Test::Deep::wrap at line 374 of Test/Deep.pm, avg 1µs/call # once (5µs+0s) by main::BEGIN@7 at line 34 of Test/Deep.pm sub Scalar::Util::refaddr; # xsub
|  |  |  |  | # spent 163µs within Scalar::Util::reftype which was called 321 times, avg 508ns/call: # 282 times (129µs+0s) by Data::DPath::Context::_any at line 109 of lib/Data/DPath/Context.pm, avg 456ns/call # 30 times (24µs+0s) by Data::DPath::Context::_select_key at line 277 of lib/Data/DPath/Context.pm, avg 807ns/call # 3 times (4µs+0s) by Sub::Install::_CODELIKE at line 98 of Sub/Install.pm, avg 1µs/call # 2 times (3µs+0s) by Safe::_find_code_refs at line 383 of Safe.pm, avg 1µs/call # 2 times (2µs+0s) by Test::Deep::class_base at line 412 of Test/Deep.pm, avg 1µs/call # 2 times (1µs+0s) by Test::Deep::RefType::descend at line 24 of Test/Deep/RefType.pm, avg 700ns/call sub Scalar::Util::reftype; # xsub
|  |  |  |  | # spent 31µs within Scalar::Util::weaken which was called 28 times, avg 1µs/call: # 14 times (16µs+0s) by Test::Deep::Cache::Simple::add at line 42 of Test/Deep/Cache/Simple.pm, avg 1µs/call # 14 times (15µs+0s) by Test::Deep::Cache::Simple::add at line 43 of Test/Deep/Cache/Simple.pm, avg 1µs/call sub Scalar::Util::weaken; # xsub