Profile of Scalar/Util.pm

← Index
NYTProf Performance Profile «line view»
For t/bug-md-11.t
Run on Fri Mar 8 13:27:24 2024
Reported on Fri Mar 8 13:30:22 2024

Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/5.38.2/x86_64-linux/Scalar/Util.pm
Statements | Executed 12 statements in 304µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1738074 | 15 | 3 | 355ms | 355ms | Scalar::Util::::weakenScalar::Util::weaken (xsub)
1 | 1 | 1 | 14µs | 15µs | Scalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
6 | 4 | 2 | 5µs | 5µs | Scalar::Util::::reftypeScalar::Util::reftype (xsub)
1 | 1 | 1 | 5µs | 19µs | Scalar::Util::::BEGIN@10Scalar::Util::BEGIN@10
2 | 2 | 1 | 1µs | 1µs | Scalar::Util::::openhandleScalar::Util::openhandle (xsub)
0 | 0 | 0 | 0s | 0s | Scalar::Util::::export_failScalar::Util::export_fail
0 | 0 | 0 | 0s | 0s | Scalar::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 |  |  |  |  |
7 |  |  |  |  | package Scalar::Util;
8 |  |  |  |  |
9 | 2 | 24µs | 2 | 17µs | # spent 15µs (14+2) within Scalar::Util::BEGIN@9 which was called: # once (14µs+2µs) by Test::Builder::BEGIN@15 at line 9 use strict; # spent 15µs making 1 call to Scalar::Util::BEGIN@9 # spent 2µs making 1 call to strict::import
10 | 2 | 132µs | 2 | 33µs | # spent 19µs (5+14) within Scalar::Util::BEGIN@10 which was called: # once (5µs+14µs) by Test::Builder::BEGIN@15 at line 10 use warnings; # spent 19µs making 1 call to Scalar::Util::BEGIN@10 # spent 14µs making 1 call to warnings::import
11 | 1 | 65µs |  |  | require Exporter;
12 |  |  |  |  |
13 | 1 | 6µs |  |  | our @ISA = qw(Exporter);
14 | 1 | 1µs |  |  | our @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 |  |  |  |  | );
20 | 1 | 200ns |  |  | our $VERSION = "1.63";
21 | 1 | 1µs |  |  | $VERSION =~ tr/_//d;
22 |  |  |  |  |
23 | 1 | 62µs |  |  | require List::Util; # List::Util loads the XS
24 | 1 | 9µs | 1 | 4µs | List::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863) # spent 4µs making 1 call to UNIVERSAL::VERSION
25 |  |  |  |  |
26 |  |  |  |  | # populating @EXPORT_FAIL is done in the XS code
27 |  |  |  |  | sub export_fail {
28 |  |  |  |  | if (grep { /^isvstring$/ } @_ ) {
29 |  |  |  |  | require Carp;
30 |  |  |  |  | Carp::croak("Vstrings are not implemented in this version of perl");
31 |  |  |  |  | }
32 |  |  |  |  |
33 |  |  |  |  | @_;
34 |  |  |  |  | }
35 |  |  |  |  |
36 |  |  |  |  | # set_prototype has been moved to Sub::Util with a different interface
37 |  |  |  |  | sub set_prototype(&$)
38 |  |  |  |  | {
39 |  |  |  |  | my ( $code, $proto ) = @_;
40 |  |  |  |  | return Sub::Util::set_prototype( $proto, $code );
41 |  |  |  |  | }
42 |  |  |  |  |
43 | 1 | 4µs |  |  | 1;
44 |  |  |  |  |
45 |  |  |  |  | __END__
|  |  |  |  | # spent 1µs within Scalar::Util::openhandle which was called 2 times, avg 700ns/call: # once (1µs+0s) by Spreadsheet::ParseXLSX::_check_signature at line 115 of /home/micha/Projekt/spreadsheet-parsexlsx/lib/Spreadsheet/ParseXLSX.pm # once (400ns+0s) by Spreadsheet::ParseXLSX::parse at line 83 of /home/micha/Projekt/spreadsheet-parsexlsx/lib/Spreadsheet/ParseXLSX.pm sub Scalar::Util::openhandle; # xsub
|  |  |  |  | # spent 5µs within Scalar::Util::reftype which was called 6 times, avg 917ns/call: # 3 times (2µs+0s) by Test2::Event::V2::facet_data at line 65 of Test2/Event/V2.pm, avg 600ns/call # once (3µs+0s) by Test2::API::Instance::add_post_load_callback at line 285 of Test2/API/Instance.pm # once (300ns+0s) by Test2::API::Instance::add_context_acquire_callback at line 249 of Test2/API/Instance.pm # once (200ns+0s) by Test2::API::Instance::add_exit_callback at line 330 of Test2/API/Instance.pm sub Scalar::Util::reftype; # xsub
|  |  |  |  | # spent 355ms within Scalar::Util::weaken which was called 1738074 times, avg 204ns/call: # 364369 times (122ms+0s) by XML::Twig::_twig_start at line 2085 of XML/Twig.pm, avg 334ns/call # 364362 times (76.1ms+0s) by XML::Twig::_twig_start at line 2101 of XML/Twig.pm, avg 209ns/call # 364362 times (63.4ms+0s) by XML::Twig::_twig_start at line 2099 of XML/Twig.pm, avg 174ns/call # 187529 times (23.1ms+0s) by XML::Twig::_twig_start at line 2096 of XML/Twig.pm, avg 123ns/call # 127292 times (22.7ms+0s) by XML::Twig::_insert_pcdata at line 2780 of XML/Twig.pm, avg 178ns/call # 127292 times (14.1ms+0s) by XML::Twig::_insert_pcdata at line 2781 of XML/Twig.pm, avg 111ns/call # 101421 times (23.0ms+0s) by XML::Twig::Elt::cut at line 7186 of XML/Twig.pm, avg 227ns/call # 33807 times (3.60ms+0s) by XML::Twig::Elt::cut at line 7204 of XML/Twig.pm, avg 106ns/call # 33807 times (3.58ms+0s) by XML::Twig::Elt::cut at line 7213 of XML/Twig.pm, avg 106ns/call # 33807 times (3.52ms+0s) by XML::Twig::Elt::cut at line 7214 of XML/Twig.pm, avg 104ns/call # 7 times (4µs+0s) by XML::Twig::new at line 751 of XML/Twig.pm, avg 629ns/call # 7 times (4µs+0s) by XML::Twig::_twig_init at line 1965 of XML/Twig.pm, avg 557ns/call # 7 times (2µs+0s) by XML::Twig::set_root at line 2290 of XML/Twig.pm, avg 329ns/call # 4 times (5µs+0s) by Test2::API::context at line 511 of Test2/API.pm, avg 1µs/call # once (700ns+0s) by Spreadsheet::ParseExcel::Worksheet::new at line 35 of Spreadsheet/ParseExcel/Worksheet.pm sub Scalar::Util::weaken; # xsub