← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:45:08 2010
Reported on Wed Nov 17 22:10:15 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native/Array/splice.pm
StatementsExecuted 17 statements in 1.54ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11180µs98µsMoose::Meta::Method::Accessor::Native::Array::splice::::BEGIN@3Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@3
11147µs904µsMoose::Meta::Method::Accessor::Native::Array::splice::::BEGIN@60Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@60
11144µs14.8msMoose::Meta::Method::Accessor::Native::Array::splice::::BEGIN@10Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@10
11142µs112µsMoose::Meta::Method::Accessor::Native::Array::splice::::BEGIN@4Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@4
0000s0sMoose::Meta::Method::Accessor::Native::Array::splice::::_adds_membersMoose::Meta::Method::Accessor::Native::Array::splice::_adds_members
0000s0sMoose::Meta::Method::Accessor::Native::Array::splice::::_inline_check_argumentsMoose::Meta::Method::Accessor::Native::Array::splice::_inline_check_arguments
0000s0sMoose::Meta::Method::Accessor::Native::Array::splice::::_inline_optimized_set_new_valueMoose::Meta::Method::Accessor::Native::Array::splice::_inline_optimized_set_new_value
0000s0sMoose::Meta::Method::Accessor::Native::Array::splice::::_inline_process_argumentsMoose::Meta::Method::Accessor::Native::Array::splice::_inline_process_arguments
0000s0sMoose::Meta::Method::Accessor::Native::Array::splice::::_minimum_argumentsMoose::Meta::Method::Accessor::Native::Array::splice::_minimum_arguments
0000s0sMoose::Meta::Method::Accessor::Native::Array::splice::::_potential_valueMoose::Meta::Method::Accessor::Native::Array::splice::_potential_value
0000s0sMoose::Meta::Method::Accessor::Native::Array::splice::::_return_valueMoose::Meta::Method::Accessor::Native::Array::splice::_return_value
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Meta::Method::Accessor::Native::Array::splice;
2
33107µs2117µs
# spent 98µs (80+18) within Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@3 which was called: # once (80µs+18µs) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@28 at line 3
use strict;
# spent 98µs making 1 call to Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@3 # spent 18µs making 1 call to strict::import
43238µs2181µs
# spent 112µs (42+70) within Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@4 which was called: # once (42µs+70µs) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@28 at line 4
use warnings;
# spent 112µs making 1 call to Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@4 # spent 70µs making 1 call to warnings::import
5
615µsour $VERSION = '1.19';
7186µs$VERSION = eval $VERSION;
# spent 36µs executing statements in string eval
814µsour $AUTHORITY = 'cpan:STEVAN';
9
103880µs229.5ms
# spent 14.8ms (44µs+14.7) within Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@10 which was called: # once (44µs+14.7ms) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@28 at line 10
use Moose::Role;
11
12138µs145.1mswith 'Moose::Meta::Method::Accessor::Native::Array::Writer' => {
# spent 45.1ms making 1 call to Moose::Role::with
13 -excludes => [
14 qw(
15 _minimum_arguments
16 _inline_process_arguments
17 _inline_check_arguments
18 _inline_optimized_set_new_value
19 _return_value
20 )
21 ]
22};
23
24sub _minimum_arguments { 1 }
25
26sub _adds_members { 1 }
27
28sub _inline_process_arguments {
29 return 'my $idx = shift;' . "\n" . 'my $len = @_ ? shift : undef;';
30}
31
32sub _inline_check_arguments {
33 my $self = shift;
34
35 return
36 $self->_inline_check_var_is_valid_index('$idx') . "\n"
37 . $self->_inline_throw_error(q{'The length argument passed to splice must be an integer'})
38 . ' if defined $len && $len !~ /^-?\\d+$/;';
39}
40
41sub _potential_value {
42 my ( $self, $slot_access ) = @_;
43
44 return "( do { my \@potential = \@{ ($slot_access) };"
45 . '@return = defined $len ? ( splice @potential, $idx, $len, @_ ) : ( splice @potential, $idx ); \\@potential } )';
46}
47
48sub _inline_optimized_set_new_value {
49 my ( $self, $inv, $new, $slot_access ) = @_;
50
51 return "\@return = defined \$len ? ( splice \@{ ($slot_access) }, \$idx, \$len, \@_ ) : ( splice \@{ ($slot_access) }, \$idx )";
52}
53
54sub _return_value {
55 my ($self, $slot_access) = @_;
56
57 return 'return wantarray ? @return : $return[-1]';
58}
59
603133µs21.76ms
# spent 904µs (47+857) within Moose::Meta::Method::Accessor::Native::Array::splice::BEGIN@60 which was called: # once (47µs+857µs) by Moose::Meta::Attribute::Native::Trait::Array::BEGIN@28 at line 60
no Moose::Role;
61
62149µs1;