← Index
NYTProf Performance Profile   « line view »
For bin/benchmark-perlformance
  Run on Fri Apr 17 15:31:48 2015
Reported on Fri Apr 17 15:32:02 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 175µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
12522111µs111µsScalar::Util::::blessedScalar::Util::blessed (xsub)
544241µs41µsScalar::Util::::reftypeScalar::Util::reftype (xsub)
11110µs20µ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
92151µs229µs
# spent 20µs (10+10) within Scalar::Util::BEGIN@9 which was called: # once (10µs+10µs) by Data::DPath::Context::BEGIN@17 at line 9
use strict;
# spent 20µs making 1 call to Scalar::Util::BEGIN@9 # spent 10µs making 1 call to strict::import
101400nsrequire Exporter;
111300nsrequire List::Util; # List::Util loads the XS
12
1314µsour @ISA = qw(Exporter);
1412µ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);
191200nsour $VERSION = "1.38";
20110µs$VERSION = eval $VERSION;
# spent 1µs executing statements in string eval
21
221100nsour @EXPORT_FAIL;
23
241400nsunless (defined &weaken) {
25 push @EXPORT_FAIL, qw(weaken);
26}
271100nsunless (defined &isweak) {
28 push @EXPORT_FAIL, qw(isweak isvstring);
29}
301200nsunless (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
4816µs1;
49
50__END__
 
# spent 111µs within Scalar::Util::blessed which was called 125 times, avg 890ns/call: # 91 times (82µs+0s) by Devel::StackTrace::_ref_to_string at line 79 of Devel/StackTrace.pm, avg 905ns/call # 34 times (29µs+0s) by Exception::Class::Base::caught at line 209 of Exception/Class/Base.pm, avg 850ns/call
sub Scalar::Util::blessed; # xsub
# spent 41µs within Scalar::Util::reftype which was called 54 times, avg 767ns/call: # 34 times (24µs+0s) by Data::DPath::Context::_any at line 119 of Data/DPath/Context.pm, avg 712ns/call # 14 times (10µs+0s) by Data::DPath::Context::_select_key at line 287 of Data/DPath/Context.pm, avg 700ns/call # 4 times (5µs+0s) by Sub::Install::_CODELIKE at line 98 of Sub/Install.pm, avg 1µs/call # 2 times (3µs+0s) by Data::DPath::Context::_select_anystep at line 312 of Data/DPath/Context.pm, avg 1µs/call
sub Scalar::Util::reftype; # xsub