← Index
NYTProf Performance Profile   « line view »
For split.pl
  Run on Thu Apr 20 02:05:47 2023
Reported on Thu Apr 20 18:31:09 2023

Filename/usr/lib/x86_64-linux-gnu/perl-base/vars.pm
StatementsExecuted 764 statements in 1.29ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
333322702µs855µsvars::::importvars::import
46831153µs153µsvars::::CORE:matchvars::CORE:match (opcode)
111139µs158µsvars::::BEGIN@7vars::BEGIN@7
11110µs10µsvars::::BEGIN@3vars::BEGIN@3
1114µs8µsvars::::BEGIN@8vars::BEGIN@8
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package vars;
2
3237µs110µs
# spent 10µs within vars::BEGIN@3 which was called: # once (10µs+0s) by Carp::Assert::BEGIN@8 at line 3
use 5.006;
# spent 10µs making 1 call to vars::BEGIN@3
4
51200nsour $VERSION = '1.05';
6
72152µs2177µs
# spent 158µs (139+19) within vars::BEGIN@7 which was called: # once (139µs+19µs) by Carp::Assert::BEGIN@8 at line 7
use warnings::register;
# spent 158µs making 1 call to vars::BEGIN@7 # spent 19µs making 1 call to warnings::register::import
82211µs211µs
# spent 8µs (4+3) within vars::BEGIN@8 which was called: # once (4µs+3µs) by Carp::Assert::BEGIN@8 at line 8
use strict qw(vars subs);
# spent 8µs making 1 call to vars::BEGIN@8 # spent 3µs making 1 call to strict::import
9
10
# spent 855µs (702+153) within vars::import which was called 33 times, avg 26µs/call: # once (52µs+11µs) by DynaLoader::BEGIN@27 at line 27 of DynaLoader.pm # once (49µs+10µs) by Params::Check::BEGIN@10 at line 10 of Params/Check.pm # once (47µs+9µs) by Pod::Escapes::BEGIN@6 at line 6 of Pod/Escapes.pm # once (44µs+6µs) by IPC::Cmd::BEGIN@16 at line 16 of IPC/Cmd.pm # once (40µs+8µs) by Module::Load::Conditional::BEGIN@21 at line 21 of Module/Load/Conditional.pm # once (32µs+6µs) by ExtUtils::MakeMaker::version::BEGIN@17 at line 17 of ExtUtils/MakeMaker/version.pm # once (30µs+7µs) by IPC::Run::BEGIN@1016 at line 1016 of IPC/Run.pm # once (31µs+6µs) by Getopt::Long::BEGIN@46 at line 46 of Getopt/Long.pm # once (25µs+6µs) by Pod::Simple::BEGIN@14 at line 14 of Pod/Simple.pm # once (25µs+6µs) by IPC::Run::BEGIN@3688 at line 3689 of IPC/Run.pm # once (23µs+5µs) by IPC::Run::Debug::BEGIN@72 at line 72 of IPC/Run/Debug.pm # once (22µs+6µs) by File::Path::BEGIN@20 at line 20 of File/Path.pm # once (21µs+5µs) by Pod::Text::BEGIN@21 at line 21 of Pod/Text.pm # once (22µs+4µs) by Getopt::Long::BEGIN@49 at line 49 of Getopt/Long.pm # once (21µs+5µs) by Text::CSV::BEGIN@7 at line 7 of Text/CSV.pm # once (19µs+5µs) by Carp::Assert::BEGIN@8 at line 8 of Carp/Assert.pm # once (18µs+4µs) by Text::CSV_XS::BEGIN@28 at line 28 of Text/CSV_XS.pm # once (18µs+3µs) by Getopt::Long::BEGIN@52 at line 52 of Getopt/Long.pm # once (17µs+4µs) by IPC::Run::Timer::BEGIN@167 at line 167 of IPC/Run/Timer.pm # once (13µs+4µs) by IPC::Run::IO::BEGIN@482 at line 483 of IPC/Run/IO.pm # once (13µs+3µs) by Getopt::Long::BEGIN@27 at line 27 of Getopt/Long.pm # once (12µs+4µs) by Pod::Simple::BlackBox::BEGIN@24 at line 24 of Pod/Simple/BlackBox.pm # once (13µs+2µs) by Getopt::Long::BEGIN@47 at line 47 of Getopt/Long.pm # once (13µs+3µs) by Pod::Simple::LinkSection::BEGIN@8 at line 8 of Pod/Simple/LinkSection.pm # once (11µs+3µs) by IPC::Run::IO::BEGIN@74 at line 74 of IPC/Run/IO.pm # once (11µs+4µs) by Getopt::Long::BEGIN@20 at line 20 of Getopt/Long.pm # once (11µs+3µs) by IPC::Run::BEGIN@1515 at line 1515 of IPC/Run.pm # once (10µs+3µs) by IPC::Run::BEGIN@1086 at line 1086 of IPC/Run.pm # once (11µs+2µs) by ExtUtils::MM_Unix::BEGIN@17 at line 17 of ExtUtils/MM_Unix.pm # once (8µs+2µs) by Pod::Simple::TiedOutFH::BEGIN@6 at line 6 of Pod/Simple/TiedOutFH.pm # once (8µs+2µs) by IPC::Run::Debug::BEGIN@25 at line 25 of (eval 24)[IPC/Run/Debug.pm:103] # once (7µs+2µs) by IPC::Run::BEGIN@1123 at line 1123 of IPC/Run.pm # once (6µs+1µs) by Getopt::Long::BEGIN@23 at line 23 of Getopt/Long.pm
sub import {
113317µs my $callpack = caller;
123329µs my (undef, @imports) = @_;
13337µs my ($sym, $ch);
143376µs foreach (@imports) {
15156280µs156104µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 104µs making 156 calls to vars::CORE:match, avg 667ns/call
16156109µs15624µs if ($sym =~ /\W/) {
# spent 24µs making 156 calls to vars::CORE:match, avg 154ns/call
17 # time for a more-detailed check-up
18 if ($sym =~ /^\w+[[{].*[]}]$/) {
19 require Carp;
20 Carp::croak("Can't declare individual elements of hash or array");
21 } elsif (warnings::enabled() and length($sym) == 1 and $sym !~ tr/a-zA-Z//) {
22 warnings::warn("No need to declare built-in vars");
23 } elsif (($^H & strict::bits('vars'))) {
24 require Carp;
25 Carp::croak("'$_' is not a valid variable name under strict vars");
26 }
27 }
28156132µs15625µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 25µs making 156 calls to vars::CORE:match, avg 160ns/call
29 *$sym =
30 ( $ch eq "\$" ? \$$sym
31 : $ch eq "\@" ? \@$sym
32 : $ch eq "\%" ? \%$sym
33 : $ch eq "\*" ? \*$sym
34 : $ch eq "\&" ? \&$sym
35156237µs : do {
36 require Carp;
37 Carp::croak("'$_' is not a valid variable name");
38 });
39 } else {
40 require Carp;
41 Carp::croak("'$_' is not a valid variable name");
42 }
43 }
44};
45
4612µs1;
47__END__
 
# spent 153µs within vars::CORE:match which was called 468 times, avg 327ns/call: # 156 times (104µs+0s) by vars::import at line 15, avg 667ns/call # 156 times (25µs+0s) by vars::import at line 28, avg 160ns/call # 156 times (24µs+0s) by vars::import at line 16, avg 154ns/call
sub vars::CORE:match; # opcode