← Index
NYTProf Performance Profile   « line view »
For rbm/rbm
  Run on Wed Feb 12 20:36:06 2020
Reported on Wed Feb 12 21:42:25 2020

Filename/usr/lib/x86_64-linux-gnu/perl/5.28/Scalar/Util.pm
StatementsExecuted 15 statements in 414µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1883243631.95s1.95sScalar::Util::::blessedScalar::Util::blessed (xsub)
2511103µs103µsScalar::Util::::refaddrScalar::Util::refaddr (xsub)
1441156µs56µsScalar::Util::::openhandleScalar::Util::openhandle (xsub)
11111µs13µsScalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
1115µs18µsScalar::Util::::BEGIN@10Scalar::Util::BEGIN@10
0000s0sScalar::Util::::export_failScalar::Util::export_fail
0000s0sScalar::Util::::set_prototypeScalar::Util::set_prototype
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
9226µs215µs
# spent 13µs (11+2) within Scalar::Util::BEGIN@9 which was called: # once (11µs+2µs) by YAML::XS::BEGIN@21 at line 9
use strict;
# spent 13µs making 1 call to Scalar::Util::BEGIN@9 # spent 2µs making 1 call to strict::import
102279µs231µs
# spent 18µs (5+13) within Scalar::Util::BEGIN@10 which was called: # once (5µs+13µs) by YAML::XS::BEGIN@21 at line 10
use warnings;
# spent 18µs making 1 call to Scalar::Util::BEGIN@10 # spent 13µs making 1 call to warnings::import
111400nsrequire Exporter;
12
1316µsour @ISA = qw(Exporter);
1411µsour @EXPORT_OK = qw(
15 blessed refaddr reftype weaken unweaken isweak
16
17 dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
18 tainted
19);
201200nsour $VERSION = "1.50";
21111µs$VERSION = eval $VERSION;
# spent 2µs executing statements in string eval
22
23167µsrequire List::Util; # List::Util loads the XS
24114µs18µsList::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863)
# spent 8µs making 1 call to UNIVERSAL::VERSION
25
26our @EXPORT_FAIL;
27
281300nsunless (defined &weaken) {
29 push @EXPORT_FAIL, qw(weaken);
30}
311100nsunless (defined &isweak) {
32 push @EXPORT_FAIL, qw(isweak isvstring);
33}
341200nsunless (defined &isvstring) {
35 push @EXPORT_FAIL, qw(isvstring);
36}
37
38sub export_fail {
39 if (grep { /^(?:weaken|isweak)$/ } @_ ) {
40 require Carp;
41 Carp::croak("Weak references are not implemented in the version of perl");
42 }
43
44 if (grep { /^isvstring$/ } @_ ) {
45 require Carp;
46 Carp::croak("Vstrings are not implemented in the version of perl");
47 }
48
49 @_;
50}
51
52# set_prototype has been moved to Sub::Util with a different interface
53sub set_prototype(&$)
54{
55 my ( $code, $proto ) = @_;
56 return Sub::Util::set_prototype( $proto, $code );
57}
58
5919µs1;
60
61__END__
 
# spent 1.95s within Scalar::Util::blessed which was called 1883243 times, avg 1µs/call: # 751787 times (1.28s+0s) by Template::Context::template at line 87 of Template/Context.pm, avg 2µs/call # 376400 times (204ms+0s) by Template::Context::process at line 373 of Template/Context.pm, avg 543ns/call # 376400 times (159ms+0s) by Template::Context::process at line 331 of Template/Context.pm, avg 423ns/call # 375387 times (308ms+0s) by Template::Context::process at line 339 of Template/Context.pm, avg 821ns/call # 3257 times (2.70ms+0s) by Template::Iterator::new at line 55 of Template/Iterator.pm, avg 828ns/call # 12 times (16µs+0s) by File::Copy::_eq at line 59 of File/Copy.pm, avg 1µs/call
sub Scalar::Util::blessed; # xsub
# spent 56µs within Scalar::Util::openhandle which was called 144 times, avg 390ns/call: # 144 times (56µs+0s) by YAML::XS::LoadFile at line 44 of YAML/XS.pm, avg 390ns/call
sub Scalar::Util::openhandle; # xsub
# spent 103µs within Scalar::Util::refaddr which was called 25 times, avg 4µs/call: # 25 times (103µs+0s) by File::Temp::NUMIFY at line 948 of File/Temp.pm, avg 4µs/call
sub Scalar::Util::refaddr; # xsub