Bencher::Scenario::Perl::5220Perf_length - Benchmark hash lookup
This document describes version 0.051 of Bencher::Scenario::Perl::5220Perf_length (from Perl distribution Bencher-Scenarios-Perl), released on 2021-07-03.
To run benchmark with default option:
% bencher -m Perl::5220Perf_length
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help.
bencher --help
From perl5220delta: There is a performance improvement of up to 20% when length is applied to a non-magical, non-tied string, and either use bytes is in scope or the string doesn't use UTF-8 internally.
length100 (perl_code)
Code template:
use bytes; my $str = <str>; for(1..100) { my $len = length($str) }
str100
Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenarios-Perl.
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-Perl.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-Perl
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
perl5220delta
perlancar <perlancar@cpan.org>
This software is copyright (c) 2021, 2019, 2016 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Bencher::Scenarios::Perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bencher::Scenarios::Perl
CPAN shell
perl -MCPAN -e shell install Bencher::Scenarios::Perl
For more information on module installation, please visit the detailed CPAN module installation guide.