NAME
Bencher::Scenario::Exporters::Startup - Benchmark the startup overhead of some exporter modules
VERSION
This document describes version 0.091 of Bencher::Scenario::Exporters::Startup (from Perl distribution Bencher-Scenarios-Exporters), released on 2019-08-16.
SYNOPSIS
To run benchmark with default option:
% bencher -m Exporters::Startup
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help
.
DESCRIPTION
Some notes:
Exporter::Lite not so lite
Despite the
::Lite
in its name and having less features than Exporter, the startup overhead is worse than Exporter (mostly due to the use of warnings).Also, this module is no longer necessary since Exporter 5.57 (2004), since Exporter can be used without subclassing, all you have to do is:
use Exporter qw(import);
BENCHMARKED MODULES
Version numbers shown below are the versions used when running the sample benchmark.
Exporter 5.72
Exporter::Lite 0.08
Exporter::Rinci 0.030
Exporter::Tidy 0.08
Exporter::Tiny 1.000000
PERLANCAR::Exporter::Lite 0.02
Perinci::Exporter 0.081
Sub::Exporter 0.987
Xporter 0.1.2
BENCHMARK PARTICIPANTS
Exporter (perl_code)
Exporter::Lite (perl_code)
Exporter::Tiny (perl_code)
Exporter::Tidy (perl_code)
Exporter::Rinci (perl_code)
Perinci::Exporter (perl_code)
PERLANCAR::Exporter::Lite (perl_code)
Sub::Exporter (perl_code)
Xporter (perl_code)
SAMPLE BENCHMARK RESULTS
Run on: perl: v5.26.1, CPU: Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz (2 cores), OS: GNU/Linux LinuxMint version 18.3, OS kernel: Linux version 4.10.0-38-generic.
Benchmark with default options (bencher -m Exporters::Startup
):
#table1#
+---------------------------+-----------+------------------------+------------+---------+---------+
| participant | time (ms) | mod_overhead_time (ms) | vs_slowest | errors | samples |
+---------------------------+-----------+------------------------+------------+---------+---------+
| Sub::Exporter | 18 | 12.1 | 1 | 3.5e-05 | 20 |
| Exporter::Tiny | 9.2 | 3.3 | 2 | 1.5e-05 | 21 |
| Xporter | 8.7 | 2.8 | 2 | 2e-05 | 20 |
| Exporter::Lite | 8.2 | 2.3 | 2.2 | 3.9e-05 | 20 |
| Perinci::Exporter | 7.2 | 1.3 | 2.5 | 2.1e-05 | 20 |
| Exporter::Rinci | 6.6 | 0.699999999999999 | 2.7 | 1.8e-05 | 20 |
| Exporter | 6.3 | 0.399999999999999 | 2.8 | 2.5e-05 | 20 |
| Exporter::Tidy | 6.2 | 0.3 | 2.9 | 2.4e-05 | 23 |
| PERLANCAR::Exporter::Lite | 6.1 | 0.199999999999999 | 2.9 | 1.1e-05 | 20 |
| perl -e1 (baseline) | 5.9 | 0 | 3 | 3.7e-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-Exporters.
SOURCE
Source repository is at https://github.com/perlancar/perl-Bencher-Scenario-StartupExporters.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-Exporters
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) 2019, 2017, 2016, 2015 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.