NAME
Bencher::Scenario::Z::Overhead - Measure startup overhead of Z
VERSION
This document describes version 0.003 of Bencher::Scenario::Z::Overhead (from Perl distribution Bencher-Scenarios-Z), released on 2020-10-08.
SYNOPSIS
To run benchmark with default option:
% bencher -m Z::Overhead
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help
.
DESCRIPTION
Packaging a benchmark script as a Bencher scenario makes it convenient to include/exclude/add participants/datasets (either via CLI or Perl code), send the result to a central repository, among others . See Bencher and bencher (CLI) for more details.
BENCHMARK PARTICIPANTS
use Z; (perl_code)
Code template:
use Z;
use Z -modern; (perl_code)
Code template:
use Z -modern;
use Z -compat; (perl_code)
Code template:
use Z -compat;
use Z -detect; (perl_code)
Code template:
use Z -detect;
use Type::Tiny; (perl_code)
Code template:
use Type::Tiny;
use Types::Standard; (perl_code)
Code template:
use Types::Standard;
use Zydeco; (perl_code)
Code template:
use Zydeco;
use Zydeco::Lite; (perl_code)
Code template:
use Zydeco::Lite;
use MooX::Press; (perl_code)
Code template:
use MooX::Press;
use Moo; (perl_code)
Code template:
use Moo;
SAMPLE BENCHMARK RESULTS
Run on: perl: v5.30.0, CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (2 cores), OS: GNU/Linux Ubuntu version 19.10, OS kernel: Linux version 5.3.0-64-generic.
Benchmark with default options (bencher -m Z::Overhead
):
#table1#
+----------------------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+
| participant | time (ms) | code_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
+----------------------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+
| use Zydeco; | 160 | 153.5 | 0.00% | 2406.96% | 0.0002 | 20 |
| use Z -modern; | 121 | 114.5 | 35.12% | 1755.42% | 0.0001 | 20 |
| use Z -detect; | 121 | 114.5 | 35.70% | 1747.39% | 7.4e-05 | 20 |
| use Z; | 120 | 113.5 | 35.83% | 1745.64% | 9.5e-05 | 20 |
| use Z -compat; | 120 | 113.5 | 36.41% | 1737.76% | 0.00023 | 20 |
| use MooX::Press; | 91 | 84.5 | 79.43% | 1297.19% | 0.00013 | 20 |
| use Zydeco::Lite; | 75.3 | 68.8 | 117.19% | 1054.26% | 5.4e-05 | 20 |
| use Types::Standard; | 44 | 37.5 | 269.61% | 578.27% | 5e-05 | 20 |
| use Type::Tiny; | 18 | 11.5 | 798.77% | 178.93% | 2.6e-05 | 21 |
| use Moo; | 18 | 11.5 | 815.02% | 173.98% | 2e-05 | 20 |
| perl -e1 (baseline) | 6.5 | 0 | 2406.96% | 0.00% | 1.1e-05 | 20 |
+----------------------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+
To display as an interactive HTML table on a browser, you can add option --format html+datatables
.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenarios-Z.
SOURCE
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-Z.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-Z
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.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2020 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.