NAME
Bencher::Scenario::ISBN::Validating - Benchmark validating ISBN
VERSION
This document describes version 0.001 of Bencher::Scenario::ISBN::Validating (from Perl distribution Bencher-Scenarios-ISBN), released on 2018-08-26.
SYNOPSIS
To run benchmark with default option:
% bencher -m ISBN::Validating
To run module startup overhead benchmark:
% bencher --module-startup -m ISBN::Validating
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.
Algorithm::CheckDigits::M10_004 v1.3.2
Algorithm::CheckDigits::M11_001 v1.3.2
Business::ISBN 3.004
BENCHMARK PARTICIPANTS
Business::ISBN (perl_code) [isbn10, isbn13]
Code template:
Business::ISBN->new(<isbn>)->is_valid ? 1:0
Algorithm::CheckDigits::M10_004 (perl_code) [isbn13]
Code template:
require Algorithm::CheckDigits; Algorithm::CheckDigits::CheckDigits("ean")->is_valid(<isbn>) ? 1:0
Algorithm::CheckDigits::M11_001 (perl_code) [isbn10]
Code template:
require Algorithm::CheckDigits; Algorithm::CheckDigits::CheckDigits("ISBN")->is_valid(<isbn>) ? 1:0
BENCHMARK DATASETS
1-56592-257-3
1-56592-257-2
978-0-596-52724-2
978-0-596-52724-1
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 ISBN::Validating
):
#table1#
+---------------------------------+-------------------+----------------+-----------+-----------+------------+---------+---------+
| participant | dataset | p_tags | rate (/s) | time (μs) | vs_slowest | errors | samples |
+---------------------------------+-------------------+----------------+-----------+-----------+------------+---------+---------+
| Business::ISBN | 1-56592-257-3 | isbn10, isbn13 | 32000 | 32 | 1 | 5.3e-08 | 20 |
| Business::ISBN | 1-56592-257-2 | isbn10, isbn13 | 32000 | 32 | 1 | 5.3e-08 | 20 |
| Business::ISBN | 978-0-596-52724-2 | isbn10, isbn13 | 33000 | 31 | 1 | 5.1e-08 | 34 |
| Business::ISBN | 978-0-596-52724-1 | isbn10, isbn13 | 33000 | 30 | 1.1 | 5.3e-08 | 20 |
| Algorithm::CheckDigits::M10_004 | 978-0-596-52724-2 | isbn13 | 120000 | 8.5 | 3.7 | 1.3e-08 | 21 |
| Algorithm::CheckDigits::M10_004 | 978-0-596-52724-1 | isbn13 | 120000 | 8.334 | 3.792 | 2e-10 | 20 |
| Algorithm::CheckDigits::M11_001 | 1-56592-257-3 | isbn10 | 130000 | 7.8 | 4 | 1e-08 | 20 |
| Algorithm::CheckDigits::M11_001 | 1-56592-257-2 | isbn10 | 130000 | 7.8 | 4.1 | 9.8e-09 | 21 |
+---------------------------------+-------------------+----------------+-----------+-----------+------------+---------+---------+
Benchmark module startup overhead (bencher -m ISBN::Validating --module-startup
):
#table2#
+---------------------------------+-----------+------------------------+------------+---------+---------+
| participant | time (ms) | mod_overhead_time (ms) | vs_slowest | errors | samples |
+---------------------------------+-----------+------------------------+------------+---------+---------+
| Business::ISBN | 31 | 26 | 1 | 3.6e-05 | 20 |
| Algorithm::CheckDigits::M11_001 | 8.7 | 3.7 | 3.6 | 1.8e-05 | 20 |
| Algorithm::CheckDigits::M10_004 | 8.6 | 3.6 | 3.6 | 4.3e-05 | 20 |
| perl -e1 (baseline) | 5 | 0 | 6.2 | 2.2e-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-ISBN.
SOURCE
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-ISBN.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-ISBN
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) 2018 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.