← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 15:33:55 2022
Reported on Wed Dec 14 15:40:02 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm
StatementsExecuted 381528 statements in 914ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
7630611462ms599msSafe::Isa::::__ANON__[:19]Safe::Isa::__ANON__[:19]
7630685239ms837msSafe::Isa::::__ANON__[:23]Safe::Isa::__ANON__[:23]
11124µs27µsSafe::Isa::::BEGIN@3Safe::Isa::BEGIN@3
11115µs29µsSafe::Isa::::BEGIN@6Safe::Isa::BEGIN@6
1116µs51µsSafe::Isa::::BEGIN@4Safe::Isa::BEGIN@4
1112µs2µ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
3230µs230µs
# spent 27µs (24+3) within Safe::Isa::BEGIN@3 which was called: # once (24µs+3µs) by OpenAPI::Modern::BEGIN@19 at line 3
use strict;
# spent 27µs making 1 call to Safe::Isa::BEGIN@3 # spent 3µs making 1 call to strict::import
4222µs296µs
# spent 51µs (6+45) within Safe::Isa::BEGIN@4 which was called: # once (6µs+45µs) by OpenAPI::Modern::BEGIN@19 at line 4
use warnings FATAL => 'all';
# spent 51µs making 1 call to Safe::Isa::BEGIN@4 # spent 45µs making 1 call to warnings::import
5226µs12µs
# spent 2µs within Safe::Isa::BEGIN@5 which was called: # once (2µs+0s) by OpenAPI::Modern::BEGIN@19 at line 5
use Scalar::Util ();
# spent 2µs making 1 call to Safe::Isa::BEGIN@5
63329µs343µs
# spent 29µs (15+14) within Safe::Isa::BEGIN@6 which was called: # once (15µs+14µs) by OpenAPI::Modern::BEGIN@19 at line 6
use Exporter 5.57 qw(import);
# spent 29µs making 1 call to Safe::Isa::BEGIN@6 # spent 10µs making 1 call to UNIVERSAL::VERSION # spent 4µ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 599ms (462+137) within Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:19] which was called 76306 times, avg 8µs/call: # 76306 times (462ms+137ms) by Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:23] at line 23, avg 8µs/call
our $_call_if_object = sub {
137630636.5ms 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.
1776306233ms7630672.2ms return unless Scalar::Util::blessed($obj);
# spent 72.2ms making 76306 calls to Scalar::Util::blessed, avg 946ns/call
1876283390ms7628364.6ms return $obj->$method(@_);
# spent 64.6ms making 76283 calls to UNIVERSAL::isa, avg 847ns/call
1913µs};
20
21our ($_isa, $_can) = map {
2234µs my $method = $_;
23152612255ms76306599ms
# spent 837ms (239+599) within Safe::Isa::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Safe/Isa.pm:23] which was called 76306 times, avg 11µs/call: # 72037 times (223ms+559ms) 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 11µs/call # 4217 times (15.6ms+38.9ms) 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 13µs/call # 25 times (126µs+199µ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 13µs/call # 15 times (71µs+71µ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 9µs/call # 9 times (33µs+50µs) by JSON::Schema::Modern::add_schema at line 152 of JSON/Schema/Modern.pm, avg 9µs/call # once (6µs+33µs) by JSON::Schema::Modern::add_schema at line 140 of JSON/Schema/Modern.pm # once (4µs+12µs) by JSON::Schema::Modern::evaluate at line 317 of JSON/Schema/Modern.pm # once (5µ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 599ms making 76306 calls to Safe::Isa::__ANON__[Safe/Isa.pm:19], avg 8µs/call
2422µ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
45111µs1;
46__END__