Scenario/Tie/Array.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary Scenario/Tie/Hash.pm »
1 package Bencher::Scenario::Tie::Array;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
7 1 our $DATE = '2023-12-27'; # DATE
8 1 our $DIST = 'Bencher-Scenarios-Tie'; # DIST
9 1 our $VERSION = '0.002'; # VERSION
10  
11 1 our $scenario = {
12 summary => 'Benchmark the overhead of tied array',
13 modules => {
14 'Tie::Array::NoOp' => {},
15 },
16 participants => [
17 {name => 'push-pop-tied-100k' , code_template => 'tie my @ary, "Tie::Array::NoOp"; for (1..100_000) { push @ary, 1; pop @ary }'},
18 {name => 'push-pop-notie-100k' , code_template => 'my @ary; for (1..100_000) { push @ary, 1; pop @ary }'},
19 # XXX other operations
20 ],
21 };
22  
23 1 1;
24 # ABSTRACT: Benchmark the overhead of tied array
25  
26 __END__
↑ Summary Scenario/Tie/Hash.pm »