← 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
StatementsExecuted 13 statements in 387µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
32165163µs163µsScalar::Util::::reftypeScalar::Util::reftype (xsub)
15362106µs106µsScalar::Util::::refaddrScalar::Util::refaddr (xsub)
425336µs36µsScalar::Util::::blessedScalar::Util::blessed (xsub)
282131µs31µsScalar::Util::::weakenScalar::Util::weaken (xsub)
11122µs38µsScalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
0000s0sScalar::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
7package Scalar::Util;
8
92253µs254µ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
101700nsrequire Exporter;
11190µsrequire List::Util; # List::Util loads the XS
12
1317µsour @ISA = qw(Exporter);
1413µsour @EXPORT_OK = qw(
15 blessed refaddr reftype weaken unweaken isweak
16
17 dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted
18);
191300nsour $VERSION = "1.38";
20123µs$VERSION = eval $VERSION;
# spent 2µs executing statements in string eval
21
221300nsour @EXPORT_FAIL;
23
241600nsunless (defined &weaken) {
25 push @EXPORT_FAIL, qw(weaken);
26}
271200nsunless (defined &isweak) {
28 push @EXPORT_FAIL, qw(isweak isvstring);
29}
301100nsunless (defined &isvstring) {
31 push @EXPORT_FAIL, qw(isvstring);
32}
33
34sub 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
4818µs1;
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