NAME
Bencher::Scenario::GetoptModules - Benchmark some popular Perl Getopt modules
VERSION
This document describes version 0.05 of Bencher::Scenario::GetoptModules (from Perl distribution Bencher-Scenario-GetoptModules), released on 2017-01-25.
SYNOPSIS
To run benchmark with default option:
% bencher -m GetoptModules
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.
BENCHMARKED MODULES
Version numbers shown below are the versions used when running the sample benchmark.
Getopt::Alt 0.4.2
Getopt::ArgParse 1.0.6
Getopt::ArgvFile 1.11
Getopt::Compact 0.04
Getopt::Long 2.48
Getopt::Long::Descriptive 0.100
Getopt::Long::Less 0.08
Getopt::Long::More 0.004
Getopt::Lucid 1.07
Getopt::Panjang 0.04
Getopt::Std 1.11
Getopt::Std::Strict 1.01
MooseX::Getopt 0.71
Smart::Options 0.056
BENCHMARK PARTICIPANTS
Getopt::Std (perl_code)
Getopt::Long (perl_code) [getopt-long]
Getopt::Long::Less (perl_code) [getopt-long]
Getopt::Long::EvenLess (perl_code) [getopt-long]
Getopt::Long::Complete (perl_code) [getopt-long]
Getopt::Long::Descriptive (perl_code) [getopt-long]
Getopt::Long::Subcommand (perl_code) [getopt-long]
Getopt::Long::More (perl_code) [getopt-long]
Getopt::Compact (perl_code) [getopt-long]
MooseX::Getopt (perl_code) [moose]
Getopt::ArgvFile (perl_code)
Getopt::Lucid (perl_code)
Getopt::Panjang (perl_code)
Getopt::Std::Strict (perl_code)
Getopt::Alt (perl_code)
Smart::Options (perl_code)
Getopt::ArgParse (perl_code)
SAMPLE BENCHMARK RESULTS
Run on: perl: v5.24.0, CPU: Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz (2 cores), OS: GNU/Linux LinuxMint version 17.3, OS kernel: Linux version 3.19.0-32-generic.
Benchmark with default options (bencher -m GetoptModules
):
#table1#
+---------------------------+------------------------------+--------------------+----------------+-----------+------------------------+------------+-----------+---------+
| participant | proc_private_dirty_size (MB) | proc_rss_size (MB) | proc_size (MB) | time (ms) | mod_overhead_time (ms) | vs_slowest | errors | samples |
+---------------------------+------------------------------+--------------------+----------------+-----------+------------------------+------------+-----------+---------+
| Getopt::Alt | 5 | 9 | 30 | 300 | 295.6 | 1 | 0.0084 | 21 |
| MooseX::Getopt | 2.4 | 5.7 | 20 | 210 | 205.6 | 1.4 | 0.00035 | 20 |
| Getopt::ArgParse | 0.82 | 4.1 | 16 | 49 | 44.6 | 5.9 | 0.00044 | 20 |
| Smart::Options | 6 | 9.7 | 32 | 35 | 30.6 | 8.2 | 0.00028 | 20 |
| Getopt::Long::Descriptive | 1.1 | 4.4 | 16 | 34 | 29.6 | 8.4 | 7.9e-05 | 20 |
| Getopt::Lucid | 0.97 | 4.4 | 16 | 27 | 22.6 | 11 | 0.00014 | 20 |
| Getopt::Compact | 18 | 22 | 58 | 23 | 18.6 | 13 | 0.00015 | 20 |
| Getopt::ArgvFile | 3.5 | 7 | 27 | 21 | 16.6 | 14 | 5.2e-05 | 20 |
| Getopt::Long | 1.1 | 4.4 | 18 | 17 | 12.6 | 17 | 7.8e-05 | 20 |
| Getopt::Std::Strict | 20 | 30 | 70 | 10 | 5.6 | 20 | 0.0005 | 20 |
| Getopt::Long::Subcommand | 1.1 | 4.5 | 16 | 8.3 | 3.9 | 35 | 4.2e-05 | 20 |
| Getopt::Long::Complete | 4.2 | 7.7 | 25 | 7.7 | 3.3 | 38 | 3.5e-05 | 21 |
| Getopt::Long::More | 2.8 | 6.3 | 20 | 7.3 | 2.9 | 40 | 4.5e-05 | 21 |
| Getopt::Long::Less | 0.94 | 4.2 | 16 | 7.2 | 2.8 | 40 | 4.5e-05 | 20 |
| Getopt::Panjang | 0.99 | 4.3 | 16 | 6.1 | 1.7 | 47 | 2.7e-05 | 20 |
| Getopt::Std | 2 | 5.4 | 17 | 6 | 1.6 | 48 | 1.3e-05 | 21 |
| Getopt::Long::EvenLess | 0.97 | 4.3 | 16 | 5.4 | 1 | 53 | 1.3e-05 | 20 |
| perl -e1 (baseline) | 1 | 4.3 | 16 | 4.4 | 0 | 66 | 1.4e-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-Scenario-GetoptModules.
SOURCE
Source repository is at https://github.com/perlancar/perl-Bencher-Scenario-StartupGetoptModules.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenario-GetoptModules
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) 2017 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.