← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 15:57:08 2022
Reported on Wed Dec 14 16:00:30 2022

Filename/Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/darwin-2level/Scalar/Util.pm
StatementsExecuted 16 statements in 282µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3277875130232ms232msScalar::Util::::blessedScalar::Util::blessed (xsub)
8231910945µs945µsScalar::Util::::weakenScalar::Util::weaken (xsub)
353102107µs107µsScalar::Util::::refaddrScalar::Util::refaddr (xsub)
963262µs62µsScalar::Util::::reftypeScalar::Util::reftype (xsub)
11113µs14µsScalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
2119µs19µsScalar::Util::::set_prototypeScalar::Util::set_prototype
1116µs19µsScalar::Util::::BEGIN@10Scalar::Util::BEGIN@10
1112µs2µsScalar::Util::::openhandleScalar::Util::openhandle (xsub)
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
9218µs215µs
# spent 14µs (13+1) within Scalar::Util::BEGIN@9 which was called: # once (13µs+1µs) by Moo::_Utils::BEGIN@36 at line 9
use strict;
# spent 14µs making 1 call to Scalar::Util::BEGIN@9 # spent 1µs making 1 call to strict::import
102219µs232µs
# spent 19µs (6+13) within Scalar::Util::BEGIN@10 which was called: # once (6µs+13µs) by Moo::_Utils::BEGIN@36 at line 10
use warnings;
# spent 19µs making 1 call to Scalar::Util::BEGIN@10 # spent 13µs making 1 call to warnings::import
1111µsrequire Exporter;
12
1317µ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);
2010sour $VERSION = "1.62";
2112µs$VERSION =~ tr/_//d;
22
2310srequire List::Util; # List::Util loads the XS
24111µs15µsList::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863)
# spent 5µs making 1 call to UNIVERSAL::VERSION
25
26# populating @EXPORT_FAIL is done in the XS code
27sub 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
37sub set_prototype(&$)
38
# spent 19µs (9+10) within Scalar::Util::set_prototype which was called 2 times, avg 10µs/call: # 2 times (9µs+10µs) by Type::Tiny::BEGIN@21 at line 364 of Types/TypeTiny.pm, avg 10µs/call
{
3921µs my ( $code, $proto ) = @_;
40217µs210µs return Sub::Util::set_prototype( $proto, $code );
# spent 10µs making 2 calls to Sub::Util::set_prototype, avg 5µs/call
41}
42
4315µs1;
44
45__END__
 
# spent 232ms within Scalar::Util::blessed which was called 327787 times, avg 707ns/call: # 76059 times (77.2ms+0s) by Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:19] at line 17 of Safe/Isa.pm, avg 1µs/call # 73713 times (62.7ms+0s) by Data::Perl::Collection::Hash::MooseLike::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Data/Perl/Collection/Hash/MooseLike.pm:22] at line 17 of Data/Perl/Collection/Hash/MooseLike.pm, avg 850ns/call # 71790 times (36.0ms+0s) by JSON::Schema::Modern::Annotation::new at line 74 of (eval 431)[Sub/Quote.pm:3], avg 501ns/call # 58139 times (32.3ms+0s) by JSON::MaybeXS::is_bool at line 59 of JSON/MaybeXS.pm, avg 556ns/call # 39138 times (18.4ms+0s) by Data::Perl::Role::Collection::Hash::kv at line 72 of Data/Perl/Role/Collection/Hash.pm, avg 470ns/call # 4217 times (2.34ms+0s) by JSON::Schema::Modern::Error::new at line 77 of (eval 432)[Sub/Quote.pm:3], avg 555ns/call # 794 times (468µs+0s) by Type::Tiny::strictly_equals at line 687 of Type/Tiny.pm, avg 589ns/call # 794 times (317µs+0s) by Type::Tiny::strictly_equals at line 688 of Type/Tiny.pm, avg 399ns/call # 703 times (321µs+0s) by Type::Tiny::is_strictly_subtype_of at line 694 of Type/Tiny.pm, avg 457ns/call # 703 times (318µs+0s) by Type::Tiny::is_strictly_subtype_of at line 695 of Type/Tiny.pm, avg 452ns/call # 343 times (196µs+0s) by Eval::TypeTiny::Sandbox::__ANON__[(eval 57)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Eval/TypeTiny.pm:8]:3] at line 3 of (eval 57)[Eval/TypeTiny.pm:8], avg 571ns/call # 295 times (234µs+0s) by Type::Library::meta at line 209 of Type/Library.pm, avg 793ns/call # 191 times (136µs+0s) by Type::Tiny::is_strictly_a_type_of at line 712 of Type/Tiny.pm, avg 712ns/call # 191 times (98µs+0s) by Type::Tiny::is_strictly_a_type_of at line 713 of Type/Tiny.pm, avg 513ns/call # 86 times (79µs+0s) by Method::Generate::Accessor::_validate_codulatable at line 683 of Method/Generate/Accessor.pm, avg 919ns/call # 83 times (66µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 795ns/call # 73 times (76µs+0s) by MooX::TypeTiny::Role::GenerateAccessor::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/MooX/TypeTiny/Role/GenerateAccessor.pm:33] at line 13 of MooX/TypeTiny/Role/GenerateAccessor.pm, avg 1µs/call # 65 times (35µs+0s) by Data::Perl::Role::Collection::Hash::set at line 37 of Data/Perl/Role/Collection/Hash.pm, avg 538ns/call # 63 times (58µs+0s) by Type::Tiny::new at line 255 of Type/Tiny.pm, avg 921ns/call # 48 times (41µs+0s) by Type::Tiny::__ANON__[(eval 430)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm:3]:16] at line 16 of (eval 430)[Sub/Quote.pm:3], avg 854ns/call # 37 times (18µs+0s) by Type::Library::add_type at line 215 of Type/Library.pm, avg 486ns/call # 37 times (15µs+0s) by Type::Library::add_type at line 222 of Type/Library.pm, avg 405ns/call # 36 times (40µs+0s) by Type::Tiny::__ANON__[(eval 428)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm:3]:16] at line 16 of (eval 428)[Sub/Quote.pm:3], avg 1µs/call # 34 times (20µs+0s) by Method::Generate::Accessor::_generate_call_code at line 512 of Method/Generate/Accessor.pm, avg 588ns/call # 29 times (26µs+0s) by Data::Perl::Role::Collection::Hash::values at line 64 of Data/Perl/Role/Collection/Hash.pm, avg 897ns/call # 17 times (14µs+0s) by MooX::TypeTiny::Role::GenerateAccessor::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/MooX/TypeTiny/Role/GenerateAccessor.pm:63] at line 42 of MooX/TypeTiny/Role/GenerateAccessor.pm, avg 824ns/call # 14 times (22µs+0s) by JSON::Schema::Modern::Document::_assert__path_to_resource at line 24 of (eval 299)[Sub/Quote.pm:3], avg 2µs/call # 14 times (20µs+0s) by JSON::Schema::Modern::Document::new at line 84 of (eval 424)[Sub/Quote.pm:3], avg 1µs/call # 14 times (11µs+0s) by JSON::Schema::Modern::Document::_set_metaschema_uri at line 39 of (eval 266)[Sub/Quote.pm:3], avg 786ns/call # 10 times (7µs+0s) by JSON::Schema::Modern::Document::_set_canonical_uri at line 39 of (eval 264)[Sub/Quote.pm:3], avg 700ns/call # 10 times (4µs+0s) by Type::Tiny::Class::new at line 41 of Type/Tiny/Class.pm, avg 400ns/call # 8 times (5µs+0s) by JSON::Schema::Modern::Document::canonical_uri at line 44 of (eval 263)[Sub/Quote.pm:3], avg 625ns/call # 6 times (4µs+0s) by JSON::Schema::Modern::Document::new at line 74 of (eval 424)[Sub/Quote.pm:3], avg 667ns/call # 4 times (7µs+0s) by Type::Coercion::add_type_coercions at line 240 of Type/Coercion.pm, avg 2µs/call # 4 times (3µs+0s) by Types::Standard::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Types/Standard.pm:1059] at line 1044 of Types/Standard.pm, avg 750ns/call # 3 times (4µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:602] at line 591 of Type/Tiny.pm, avg 1µs/call # 3 times (2µs+0s) by Type::Library::add_coercion at line 269 of Type/Library.pm, avg 667ns/call # 3 times (2µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:602] at line 590 of Type/Tiny.pm, avg 667ns/call # 3 times (1µs+0s) by Type::Library::add_coercion at line 274 of Type/Library.pm, avg 333ns/call # 2 times (2µs+0s) by Type::Tiny::Union::new_by_overload at line 30 of Type/Tiny/Union.pm, avg 1µs/call # once (31µs+0s) by JSON::Schema::Modern::Result::new at line 123 of (eval 433)[Sub/Quote.pm:3] # once (2µs+0s) by YAML::PP::Dumper::new at line 37 of YAML/PP/Dumper.pm # once (2µs+0s) by YAML::PP::new at line 51 of YAML/PP.pm # once (2µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 77 of (eval 417)[Sub/Quote.pm:3] # once (1µs+0s) by YAML::PP::Schema::load_subschemas at line 108 of YAML/PP/Schema.pm # once (1µs+0s) by JSON::Schema::Modern::_json_decoder at line 24 of (eval 362)[Sub/Quote.pm:3] # once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::_set_json_schema_dialect at line 39 of (eval 390)[Sub/Quote.pm:3] # once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 87 of (eval 417)[Sub/Quote.pm:3] # once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 138 of (eval 417)[Sub/Quote.pm:3] # once (0s+0s) by OpenAPI::Modern::new at line 43 of (eval 415)[Sub/Quote.pm:3] # once (0s+0s) by OpenAPI::Modern::new at line 48 of (eval 415)[Sub/Quote.pm:3]
sub Scalar::Util::blessed; # xsub
# spent 2µs within Scalar::Util::openhandle which was called: # once (2µs+0s) by YAML::PP::Reader::File::open_handle at line 52 of YAML/PP/Reader.pm
sub Scalar::Util::openhandle; # xsub
# spent 107µs within Scalar::Util::refaddr which was called 353 times, avg 303ns/call: # 180 times (38µs+0s) by JSON::Schema::Modern::add_schema at line 169 of JSON/Schema/Modern.pm, avg 211ns/call # 83 times (28µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 337ns/call # 24 times (19µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 630 of Type/Tiny.pm, avg 792ns/call # 24 times (4µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 632 of Type/Tiny.pm, avg 167ns/call # 12 times (8µs+0s) by JSON::Schema::Modern::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern.pm:672] at line 655 of JSON/Schema/Modern.pm, avg 667ns/call # 6 times (3µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 606 of Type/Tiny.pm, avg 500ns/call # 6 times (3µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 617 of Type/Tiny.pm, avg 500ns/call # 6 times (2µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 615 of Type/Tiny.pm, avg 333ns/call # 6 times (1µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 609 of Type/Tiny.pm, avg 167ns/call # 6 times (1µs+0s) by Type::Tiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Type/Tiny.pm:659] at line 646 of Type/Tiny.pm, avg 167ns/call
sub Scalar::Util::refaddr; # xsub
# spent 62µs within Scalar::Util::reftype which was called 96 times, avg 646ns/call: # 83 times (56µs+0s) by Type::Tiny::_stringify_no_magic at line 385 of Type/Tiny.pm, avg 675ns/call # 9 times (4µs+0s) by Type::Tiny::new at line 364 of Type/Tiny.pm, avg 444ns/call # 4 times (2µs+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm, avg 500ns/call
sub Scalar::Util::reftype; # xsub
# spent 945µs within Scalar::Util::weaken which was called 823 times, avg 1µs/call: # 134 times (163µs+0s) by Sub::Quote::quote_sub at line 218 of Sub/Quote.pm, avg 1µs/call # 119 times (150µs+0s) by Moo::_Utils::_install_tracked at line 100 of Moo/_Utils.pm, avg 1µs/call # 113 times (132µs+0s) by Sub::Quote::unquote_sub at line 362 of Sub/Quote.pm, avg 1µs/call # 82 times (79µs+0s) by Type::Tiny::new at line 331 of Type/Tiny.pm, avg 963ns/call # 82 times (48µs+0s) by Type::Tiny::new at line 334 of Type/Tiny.pm, avg 585ns/call # 58 times (172µs+0s) by Type::Coercion::new at line 63 of Type/Coercion.pm, avg 3µs/call # 37 times (65µs+0s) by Sub::Defer::defer_sub at line 182 of Sub/Defer.pm, avg 2µs/call # 37 times (15µs+0s) by Sub::Defer::defer_sub at line 183 of Sub/Defer.pm, avg 405ns/call # 34 times (19µs+0s) by Type::Tiny::parameterize at line 1079 of Type/Tiny.pm, avg 559ns/call # 27 times (17µs+0s) by Sub::Quote::quote_sub at line 239 of Sub/Quote.pm, avg 630ns/call # 27 times (14µs+0s) by Sub::Quote::quote_sub at line 238 of Sub/Quote.pm, avg 519ns/call # 21 times (16µs+0s) by Moo::_Utils::_install_modifier at line 91 of Moo/_Utils.pm, avg 762ns/call # 14 times (16µs+0s) by JSON::Schema::Modern::Document::new at line 83 of (eval 424)[Sub/Quote.pm:3], avg 1µs/call # 14 times (15µs+0s) by Sub::Defer::undefer_sub at line 97 of Sub/Defer.pm, avg 1µs/call # 10 times (7µs+0s) by Method::Generate::Constructor::install_delayed at line 103 of Method/Generate/Constructor.pm, avg 700ns/call # 8 times (10µs+0s) by Method::Generate::Constructor::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Method/Generate/Constructor.pm:101] at line 99 of Method/Generate/Constructor.pm, avg 1µs/call # 4 times (5µs+0s) by Type::Tiny::Enum::_build_compiled_check at line 199 of Type/Tiny/Enum.pm, avg 1µs/call # once (1µs+0s) by JSON::Schema::Modern::Document::OpenAPI::new at line 86 of (eval 417)[Sub/Quote.pm:3] # once (1µs+0s) by JSON::Schema::Modern::BEGIN@31 at line 257 of Types/Standard.pm
sub Scalar::Util::weaken; # xsub