NAME

Bencher::Scenario::CloneModules::Startup - Benchmark startup of various data cloning modules

VERSION

This document describes version 0.051 of Bencher::Scenario::CloneModules::Startup (from Perl distribution Bencher-Scenarios-CloneModules), released on 2021-07-31.

SYNOPSIS

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.

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.

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

BENCHMARK PARTICIPANTS

BENCHMARK SAMPLE RESULTS

Sample benchmark #1

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 |
 +------------------------------+-----------+-------------------+-----------------------+-----------------------+-----------+---------+
 | Sereal::Dclone               |        10 |                 5 |                 0.00% |               148.21% |   0.0003  |      20 |
 | Storable                     |        10 |                 5 |                 0.55% |               146.86% |   0.00016 |      21 |
 | Clone                        |        10 |                 5 |                24.57% |                99.25% |   0.00023 |      21 |
 | Clone::Util                  |         8 |                 3 |                52.22% |                63.06% |   0.00015 |      20 |
 | Clone::PP                    |         8 |                 3 |                53.43% |                61.77% |   0.00014 |      20 |
 | Function::Fallback::CoreOrPP |         7 |                 2 |                66.11% |                49.42% |   0.00013 |      20 |
 | Data::Clone                  |         7 |                 2 |                70.32% |                45.73% | 9.3e-05   |      20 |
 | perl -e1 (baseline)          |         5 |                 0 |               148.21% |                 0.00% | 1.2e-05   |      20 |
 +------------------------------+-----------+-------------------+-----------------------+-----------------------+-----------+---------+

The above result formatted in Benchmark.pm style:

                          Rate   S:D     S     C   C:U   C:P  FF:C   D:C  perl -e1 (baseline) 
  S:D                  100.0/s    --    0%    0%  -19%  -19%  -30%  -30%                 -50% 
  S                    100.0/s    0%    --    0%  -19%  -19%  -30%  -30%                 -50% 
  C                    100.0/s    0%    0%    --  -19%  -19%  -30%  -30%                 -50% 
  C:U                  125.0/s   25%   25%   25%    --    0%  -12%  -12%                 -37% 
  C:P                  125.0/s   25%   25%   25%    0%    --  -12%  -12%                 -37% 
  FF:C                 142.9/s   42%   42%   42%   14%   14%    --    0%                 -28% 
  D:C                  142.9/s   42%   42%   42%   14%   14%    0%    --                 -28% 
  perl -e1 (baseline)  200.0/s  100%  100%  100%   60%   60%   39%   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=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:

Sample benchmark #2

Benchmark command (cloning a 10k-pair hash):

 % bencher -m CloneModules::Startup --include-datasets hash10k

Result formatted as table:

 #table2#
 +------------------------------+-----------+-------------------+-----------------------+-----------------------+-----------+---------+
 | participant                  | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors   | samples |
 +------------------------------+-----------+-------------------+-----------------------+-----------------------+-----------+---------+
 | Storable                     |        12 |                 6 |                 0.00% |               104.42% |   9e-05   |      20 |
 | Sereal::Dclone               |        11 |                 5 |                10.59% |                84.85% | 3.3e-05   |      21 |
 | Clone                        |        10 |                 4 |                19.86% |                70.56% |   0.00038 |      20 |
 | Clone::PP                    |         9 |                 3 |                42.88% |                43.08% |   0.00016 |      20 |
 | Function::Fallback::CoreOrPP |         8 |                 2 |                45.88% |                40.13% |   0.00015 |      20 |
 | Clone::Util                  |         8 |                 2 |                49.01% |                37.19% | 8.3e-05   |      20 |
 | Data::Clone                  |         7 |                 1 |                66.39% |                22.86% |   0.0001  |      20 |
 | perl -e1 (baseline)          |         6 |                 0 |               104.42% |                 0.00% | 6.7e-05   |      20 |
 +------------------------------+-----------+-------------------+-----------------------+-----------------------+-----------+---------+

The above result formatted in Benchmark.pm style:

                          Rate     S  S:D     C   C:P  FF:C   C:U   D:C  perl -e1 (baseline) 
  S                     83.3/s    --  -8%  -16%  -25%  -33%  -33%  -41%                 -50% 
  S:D                   90.9/s    9%   --   -9%  -18%  -27%  -27%  -36%                 -45% 
  C                    100.0/s   19%  10%    --   -9%  -19%  -19%  -30%                 -40% 
  C:P                  111.1/s   33%  22%   11%    --  -11%  -11%  -22%                 -33% 
  FF:C                 125.0/s   50%  37%   25%   12%    --    0%  -12%                 -25% 
  C:U                  125.0/s   50%  37%   25%   12%    0%    --  -12%                 -25% 
  D:C                  142.9/s   71%  57%   42%   28%   14%   14%    --                 -14% 
  perl -e1 (baseline)  166.7/s  100%  83%   66%   50%   33%   33%   16%                   -- 
 
 Legends:
   C: mod_overhead_time=4 participant=Clone
   C:P: mod_overhead_time=3 participant=Clone::PP
   C:U: mod_overhead_time=2 participant=Clone::Util
   D:C: mod_overhead_time=1 participant=Data::Clone
   FF:C: mod_overhead_time=2 participant=Function::Fallback::CoreOrPP
   S: mod_overhead_time=6 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:

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-CloneModules.

SOURCE

Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-CloneModules.

BUGS

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.

SEE ALSO

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

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.