NAME
Bencher::Scenario::DataSahVSTypeTiny::Validate - Benchmark validation
VERSION
This document describes version 0.003 of Bencher::Scenario::DataSahVSTypeTiny::Validate (from Perl distribution Bencher-Scenarios-DataSahVSTypeTiny), released on 2020-10-01.
SYNOPSIS
To run benchmark with default option:
% bencher -m DataSahVSTypeTiny::Validate
To run module startup overhead benchmark:
% bencher --module-startup -m DataSahVSTypeTiny::Validate
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.
Data::Sah 0.908
BENCHMARK PARTICIPANTS
dsah (perl_code) [dsah]
Code template:
state $v = Data::Sah::gen_validator(<schema>); $v->(<data>)
tt (perl_code) [tt]
Code template:
state $v = (<type:raw>)->compiled_check; $v->(<data>)
BENCHMARK DATASETS
int(dsah)
int(tt)
array10(dsah)
array10(tt)
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 DataSahVSTypeTiny::Validate
):
#table1#
+-------------+---------------+----------+--------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| participant | dataset | arg_data | p_tags | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
+-------------+---------------+----------+--------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| dsah | array10(dsah) | | dsah | 186000 | 5.3764 | 0.00% | 8107.42% | 4.6e-11 | 20 |
| tt | array10(tt) | | tt | 1500000 | 0.65 | 726.42% | 893.13% | 8.3e-10 | 20 |
| dsah | int(dsah) | a | dsah | 2740000 | 0.365 | 1372.19% | 457.50% | 5.7e-11 | 20 |
| dsah | int(dsah) | 1 | dsah | 3100000 | 0.32 | 1558.12% | 394.98% | 4.2e-10 | 20 |
| dsah | int(dsah) | | dsah | 4500000 | 0.22 | 2338.71% | 236.55% | 6.5e-10 | 21 |
| tt | int(tt) | 1 | tt | 12000000 | 0.085 | 6254.67% | 29.16% | 4.6e-10 | 21 |
| tt | int(tt) | | tt | 10000000 | 0.08 | 6601.07% | 22.48% | 8.7e-10 | 20 |
| tt | int(tt) | a | tt | 20000000 | 0.07 | 8107.42% | 0.00% | 1.3e-09 | 21 |
+-------------+---------------+----------+--------+-----------+-----------+-----------------------+-----------------------+---------+---------+
Benchmark module startup overhead (bencher -m DataSahVSTypeTiny::Validate --module-startup
):
#table2#
+---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
| participant | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
+---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
| Data::Sah | 23 | 9 | 0.00% | 67.02% | 0.00022 | 20 |
| perl -e1 (baseline) | 14 | 0 | 67.02% | 0.00% | 0.00011 | 21 |
+---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
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-DataSahVSTypeTiny.
SOURCE
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-DataSahVSTypeTiny.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-DataSahVSTypeTiny
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, 2017, 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.