← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 16:10:05 2022
Reported on Wed Dec 14 16:12:56 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm
StatementsExecuted 21343 statements in 70.4ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
42691137.2ms49.2msSafe::Isa::::__ANON__[:19]Safe::Isa::__ANON__[:19]
42697419.3ms68.5msSafe::Isa::::__ANON__[:23]Safe::Isa::__ANON__[:23]
11153µs57µsSafe::Isa::::BEGIN@3Safe::Isa::BEGIN@3
11139µs39µsSafe::Isa::::BEGIN@5Safe::Isa::BEGIN@5
11119µs52µsSafe::Isa::::BEGIN@6Safe::Isa::BEGIN@6
11110µs63µsSafe::Isa::::BEGIN@4Safe::Isa::BEGIN@4
0000s0sSafe::Isa::::__ANON__[:30]Safe::Isa::__ANON__[:30]
0000s0sSafe::Isa::::__ANON__[:35]Safe::Isa::__ANON__[:35]
0000s0sSafe::Isa::::__ANON__[:43]Safe::Isa::__ANON__[:43]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Safe::Isa;
2
3249µs261µs
# spent 57µs (53+4) within Safe::Isa::BEGIN@3 which was called: # once (53µs+4µs) by OpenAPI::Modern::BEGIN@19 at line 3
use strict;
# spent 57µs making 1 call to Safe::Isa::BEGIN@3 # spent 4µs making 1 call to strict::import
4260µs2116µs
# spent 63µs (10+53) within Safe::Isa::BEGIN@4 which was called: # once (10µs+53µs) by OpenAPI::Modern::BEGIN@19 at line 4
use warnings FATAL => 'all';
# spent 63µs making 1 call to Safe::Isa::BEGIN@4 # spent 53µs making 1 call to warnings::import
5229µs139µs
# spent 39µs within Safe::Isa::BEGIN@5 which was called: # once (39µs+0s) by OpenAPI::Modern::BEGIN@19 at line 5
use Scalar::Util ();
# spent 39µs making 1 call to Safe::Isa::BEGIN@5
63368µs385µs
# spent 52µs (19+33) within Safe::Isa::BEGIN@6 which was called: # once (19µs+33µs) by OpenAPI::Modern::BEGIN@19 at line 6
use Exporter 5.57 qw(import);
# spent 52µs making 1 call to Safe::Isa::BEGIN@6 # spent 23µs making 1 call to Exporter::import # spent 10µs making 1 call to UNIVERSAL::VERSION
7
810sour $VERSION = '1.000010';
9
1011µsour @EXPORT = qw($_call_if_object $_isa $_can $_does $_DOES $_call_if_can);
11
12
# spent 49.2ms (37.2+12.0) within Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:19] which was called 4269 times, avg 12µs/call: # 4269 times (37.2ms+12.0ms) by Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:23] at line 23, avg 12µs/call
our $_call_if_object = sub {
1342692.99ms my ($obj, $method) = (shift, shift);
14 # This is intentionally a truth test, not a defined test, otherwise
15 # we gratuitously break modules like Scalar::Defer, which would be
16 # un-perlish.
17426919.0ms42695.83ms return unless Scalar::Util::blessed($obj);
# spent 5.83ms making 4269 calls to Scalar::Util::blessed, avg 1µs/call
18424630.4ms42466.21ms return $obj->$method(@_);
# spent 6.21ms making 4246 calls to UNIVERSAL::isa, avg 1µs/call
1913µs};
20
21our ($_isa, $_can) = map {
2233µs my $method = $_;
23853817.6ms426949.2ms
# spent 68.5ms (19.3+49.2) within Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:23] which was called 4269 times, avg 16µs/call: # 4217 times (19.1ms+48.8ms) by JSON::Schema::Modern::Error::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Error.pm:39] at line 39 of JSON/Schema/Modern/Error.pm, avg 16µs/call # 25 times (84µs+224µs) by JSON::Schema::Modern::Document::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Document.pm:39] at line 39 of JSON/Schema/Modern/Document.pm, avg 12µs/call # 15 times (68µs+89µs) by JSON::Schema::Modern::Document::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Document.pm:45] at line 45 of JSON/Schema/Modern/Document.pm, avg 10µs/call # 9 times (38µs+54µs) by JSON::Schema::Modern::add_schema at line 152 of JSON/Schema/Modern.pm, avg 10µs/call # once (4µs+14µs) by JSON::Schema::Modern::add_schema at line 140 of JSON/Schema/Modern.pm # once (5µs+4µs) by JSON::Schema::Modern::Document::OpenAPI::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Document/OpenAPI.pm:56] at line 56 of JSON/Schema/Modern/Document/OpenAPI.pm # once (3µs+5µs) by JSON::Schema::Modern::evaluate at line 321 of JSON/Schema/Modern.pm
sub { my $obj = shift; $obj->$_call_if_object($method => @_) }
# spent 49.2ms making 4269 calls to Safe::Isa::__ANON__[Safe/Isa.pm:19], avg 12µs/call
2423µs} qw(isa can);
25
26our $_call_if_can = sub {
27 my ($obj, $method) = (shift, shift);
28 return unless $obj->$_call_if_object(can => $method);
29 return $obj->$method(@_);
3012µs};
31
32our $_does = sub {
33 my $obj = shift;
34 $obj->$_call_if_can(does => @_);
3511µs};
36
37our $_DOES = sub {
38 my $obj = shift;
39 return unless Scalar::Util::blessed($obj);
40 return $obj->DOES(@_)
41 if $obj->can('DOES');
42 return $obj->isa(@_);
4311µs};
44
4517µs1;
46__END__