Bencher::Scenario::CloneModules::Startup - Benchmark startup of various data cloning modules
This document describes version 0.050 of Bencher::Scenario::CloneModules::Startup (from Perl distribution Bencher-Scenarios-CloneModules), released on 2021-07-31.
To run benchmark with default option:
% bencher -m CloneModules::Startup
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help.
bencher --help
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.
Version numbers shown below are the versions used when running the sample benchmark.
Clone 0.45
Clone::PP 1.08
Clone::Util 0.03
Data::Clone 0.004
Function::Fallback::CoreOrPP 0.090
Sereal::Dclone 0.003
Storable 3.23
Clone (perl_code)
Clone
Clone::PP (perl_code)
Clone::PP
Clone::Util (perl_code)
Clone::Util
Data::Clone (perl_code)
Data::Clone
Function::Fallback::CoreOrPP (perl_code)
Function::Fallback::CoreOrPP
Sereal::Dclone (perl_code)
Sereal::Dclone
Storable (perl_code)
Storable
Run on: perl: v5.34.0, CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (4 cores), OS: GNU/Linux LinuxMint version 19, OS kernel: Linux version 5.3.0-68-generic.
Benchmark command (cloning a 10k-element array):
% bencher -m CloneModules::Startup --include-datasets array10k
Result formatted as table:
#table1# +------------------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+ | participant | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +------------------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+ | Storable | 10 | 5 | 0.00% | 145.33% | 0.00022 | 20 | | Sereal::Dclone | 10 | 5 | 0.80% | 143.39% | 0.00032 | 21 | | Clone | 10 | 5 | 34.36% | 82.59% | 0.00014 | 20 | | Clone::PP | 9 | 4 | 51.75% | 61.67% | 0.00016 | 20 | | Clone::Util | 8 | 3 | 66.17% | 47.64% | 0.00014 | 20 | | Function::Fallback::CoreOrPP | 7 | 2 | 73.07% | 41.75% | 0.00014 | 20 | | Data::Clone | 7 | 2 | 85.98% | 31.91% | 0.00014 | 20 | | perl -e1 (baseline) | 5 | 0 | 145.33% | 0.00% | 0.00018 | 21 | +------------------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
The above result formatted in Benchmark.pm style:
Rate S S:D C C:P C:U FF:C D:C perl -e1 (baseline) S 100.0/s -- 0% 0% -9% -19% -30% -30% -50% S:D 100.0/s 0% -- 0% -9% -19% -30% -30% -50% C 100.0/s 0% 0% -- -9% -19% -30% -30% -50% C:P 111.1/s 11% 11% 11% -- -11% -22% -22% -44% C:U 125.0/s 25% 25% 25% 12% -- -12% -12% -37% FF:C 142.9/s 42% 42% 42% 28% 14% -- 0% -28% D:C 142.9/s 42% 42% 42% 28% 14% 0% -- -28% perl -e1 (baseline) 200.0/s 100% 100% 100% 80% 60% 39% 39% -- Legends: C: mod_overhead_time=5 participant=Clone C:P: mod_overhead_time=4 participant=Clone::PP C:U: mod_overhead_time=3 participant=Clone::Util D:C: mod_overhead_time=2 participant=Data::Clone FF:C: mod_overhead_time=2 participant=Function::Fallback::CoreOrPP S: mod_overhead_time=5 participant=Storable S:D: mod_overhead_time=5 participant=Sereal::Dclone perl -e1 (baseline): mod_overhead_time=0 participant=perl -e1 (baseline)
The above result presented as chart:
#IMAGE: share/images/bencher-result-1.png|/tmp/stQrYN5WkQ/bencher-result-1.png
Benchmark command (cloning a 10k-pair hash):
% bencher -m CloneModules::Startup --include-datasets hash10k
#table2# +------------------------------+-----------+-------------------+-----------------------+-----------------------+-----------+---------+ | participant | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +------------------------------+-----------+-------------------+-----------------------+-----------------------+-----------+---------+ | Storable | 10 | 5 | 0.00% | 161.00% | 0.00015 | 22 | | Sereal::Dclone | 12 | 7 | 6.44% | 145.21% | 6.4e-05 | 20 | | Clone | 10 | 5 | 27.43% | 104.82% | 0.00018 | 21 | | Function::Fallback::CoreOrPP | 8 | 3 | 46.41% | 78.27% | 0.00019 | 20 | | Clone::PP | 8 | 3 | 48.73% | 75.48% | 0.00011 | 20 | | Clone::Util | 8 | 3 | 59.79% | 63.34% | 0.00012 | 20 | | Data::Clone | 7 | 2 | 73.17% | 50.72% | 9.5e-05 | 20 | | perl -e1 (baseline) | 5 | 0 | 161.00% | 0.00% | 0.00018 | 20 | +------------------------------+-----------+-------------------+-----------------------+-----------------------+-----------+---------+
Rate S:D S C FF:C C:P C:U D:C perl -e1 (baseline) S:D 83.3/s -- -16% -16% -33% -33% -33% -41% -58% S 100.0/s 19% -- 0% -19% -19% -19% -30% -50% C 100.0/s 19% 0% -- -19% -19% -19% -30% -50% FF:C 125.0/s 50% 25% 25% -- 0% 0% -12% -37% C:P 125.0/s 50% 25% 25% 0% -- 0% -12% -37% C:U 125.0/s 50% 25% 25% 0% 0% -- -12% -37% D:C 142.9/s 71% 42% 42% 14% 14% 14% -- -28% perl -e1 (baseline) 200.0/s 140% 100% 100% 60% 60% 60% 39% -- Legends: C: mod_overhead_time=5 participant=Clone C:P: mod_overhead_time=3 participant=Clone::PP C:U: mod_overhead_time=3 participant=Clone::Util D:C: mod_overhead_time=2 participant=Data::Clone FF:C: mod_overhead_time=3 participant=Function::Fallback::CoreOrPP S: mod_overhead_time=5 participant=Storable S:D: mod_overhead_time=7 participant=Sereal::Dclone perl -e1 (baseline): mod_overhead_time=0 participant=perl -e1 (baseline)
#IMAGE: share/images/bencher-result-2.png|/tmp/stQrYN5WkQ/bencher-result-2.png
To display as an interactive HTML table on a browser, you can add option --format html+datatables.
--format html+datatables
Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenarios-CloneModules.
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-CloneModules.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-CloneModules
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.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2021, 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.
To install Bencher::Scenarios::CloneModules, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bencher::Scenarios::CloneModules
CPAN shell
perl -MCPAN -e shell install Bencher::Scenarios::CloneModules
For more information on module installation, please visit the detailed CPAN module installation guide.