← 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/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm
StatementsExecuted 380293 statements in 1.01s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
7605911507ms657msSafe::Isa::::__ANON__[:19]Safe::Isa::__ANON__[:19]
7605985256ms913msSafe::Isa::::__ANON__[:23]Safe::Isa::__ANON__[:23]
11121µs24µsSafe::Isa::::BEGIN@3Safe::Isa::BEGIN@3
11112µs24µsSafe::Isa::::BEGIN@6Safe::Isa::BEGIN@6
1115µs39µsSafe::Isa::::BEGIN@4Safe::Isa::BEGIN@4
1111µs1µsSafe::Isa::::BEGIN@5Safe::Isa::BEGIN@5
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
3228µs227µs
# spent 24µs (21+3) within Safe::Isa::BEGIN@3 which was called: # once (21µs+3µs) by OpenAPI::Modern::BEGIN@19 at line 3
use strict;
# spent 24µs making 1 call to Safe::Isa::BEGIN@3 # spent 3µs making 1 call to strict::import
4217µs273µs
# spent 39µs (5+34) within Safe::Isa::BEGIN@4 which was called: # once (5µs+34µs) by OpenAPI::Modern::BEGIN@19 at line 4
use warnings FATAL => 'all';
# spent 39µs making 1 call to Safe::Isa::BEGIN@4 # spent 34µs making 1 call to warnings::import
5218µs11µs
# spent 1µs within Safe::Isa::BEGIN@5 which was called: # once (1µs+0s) by OpenAPI::Modern::BEGIN@19 at line 5
use Scalar::Util ();
# spent 1µs making 1 call to Safe::Isa::BEGIN@5
63361µs336µs
# spent 24µs (12+12) within Safe::Isa::BEGIN@6 which was called: # once (12µs+12µs) by OpenAPI::Modern::BEGIN@19 at line 6
use Exporter 5.57 qw(import);
# spent 24µs making 1 call to Safe::Isa::BEGIN@6 # spent 7µs making 1 call to UNIVERSAL::VERSION # spent 5µs making 1 call to Exporter::import
7
810sour $VERSION = '1.000010';
9
1011µsour @EXPORT = qw($_call_if_object $_isa $_can $_does $_DOES $_call_if_can);
11
12
# spent 657ms (507+150) within Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:19] which was called 76059 times, avg 9µs/call: # 76059 times (507ms+150ms) by Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:23] at line 23, avg 9µs/call
our $_call_if_object = sub {
137605936.0ms 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.
1776059276ms7605977.2ms return unless Scalar::Util::blessed($obj);
# spent 77.2ms making 76059 calls to Scalar::Util::blessed, avg 1µs/call
1876036409ms7603672.6ms return $obj->$method(@_);
# spent 72.6ms making 76036 calls to UNIVERSAL::isa, avg 954ns/call
1912µs};
20
21our ($_isa, $_can) = map {
2232µs my $method = $_;
23152118293ms76059657ms
# spent 913ms (256+657) within Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:23] which was called 76059 times, avg 12µs/call: # 71790 times (240ms+615ms) by JSON::Schema::Modern::Annotation::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Annotation.pm:35] at line 35 of JSON/Schema/Modern/Annotation.pm, avg 12µs/call # 4217 times (15.9ms+41.3ms) 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 14µs/call # 25 times (88µs+294µ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 15µs/call # 15 times (93µs+81µ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 12µs/call # 9 times (68µs+71µs) by JSON::Schema::Modern::add_schema at line 152 of JSON/Schema/Modern.pm, avg 15µs/call # once (7µs+19µs) by JSON::Schema::Modern::add_schema at line 140 of JSON/Schema/Modern.pm # once (4µs+8µs) by JSON::Schema::Modern::evaluate at line 317 of JSON/Schema/Modern.pm # once (4µs+5µ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
sub { my $obj = shift; $obj->$_call_if_object($method => @_) }
# spent 657ms making 76059 calls to Safe::Isa::__ANON__[Safe/Isa.pm:19], avg 9µs/call
2421µ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(@_);
3011µ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
4515µs1;
46__END__