NAME
Bencher::Scenario::Allocations - Benchmark allocations
VERSION
This document describes version 0.03 of Bencher::Scenario::Allocations (from Perl distribution Bencher-Scenario-Allocations), released on 2016-06-26.
SYNOPSIS
To run benchmark with default option:
% bencher -m Allocations
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help
.
BENCHMARK PARTICIPANTS
1k-array0 (perl_code)
Allocating empty array 1000 times.
Code template:
my $val; for (1..1000) { $val = [] }
1k-hash0 (perl_code)
Allocating empty hash 1000 times.
Code template:
my $val; for (1..1000) { $val = {} }
1k-array1 (perl_code)
Allocating 1-element array 1000 times.
Code template:
my $val; for (1..1000) { $val = [1] }
1k-hash1 (perl_code)
Allocating 1-key hash 1000 times.
Code template:
my $val; for (1..1000) { $val = {a=>1} }
1k-array5 (perl_code)
Allocating 5-element array 1000 times.
Code template:
my $val; for (1..1000) { $val = [1..5] }
1k-hash5 (perl_code)
Allocating 5-key hash 1000 times.
Code template:
my $val; for (1..1000) { $val = {a=>1, b=>2, c=>3, d=>4, e=>5} }
1k-array10 (perl_code)
Allocating 10-element array 1000 times.
Code template:
my $val; for (1..1000) { $val = [1..10] }
1k-hash10 (perl_code)
Allocating 10-key hash 1000 times.
Code template:
my $val; for (1..1000) { $val = {1..20} }
1k-array100 (perl_code)
Allocating 100-element array 1000 times.
Code template:
my $val; for (1..1000) { $val = [1..100] }
1k-hash100 (perl_code)
Allocating 100-key hash 1000 times.
Code template:
my $val; for (1..1000) { $val = {1..200} }
SAMPLE BENCHMARK RESULTS
Run on: perl: v5.22.2, CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (4 cores), OS: GNU/Linux Debian version 8.0, OS kernel: Linux version 3.16.0-4-amd64.
Benchmark with default options (bencher -m Allocations
):
+-------------+-----------+-----------+------------+---------+---------+
| participant | rate (/s) | time (ms) | vs_slowest | errors | samples |
+-------------+-----------+-----------+------------+---------+---------+
| 1k-hash100 | 150 | 6.7 | 1 | 2.1e-05 | 20 |
| 1k-array100 | 672 | 1.49 | 4.53 | 2.3e-07 | 26 |
| 1k-hash10 | 1320 | 0.76 | 8.86 | 2.1e-07 | 20 |
| 1k-hash5 | 2260 | 0.442 | 15.2 | 5.3e-08 | 20 |
| 1k-array10 | 3534.38 | 0.282935 | 23.8105 | 4.5e-11 | 20 |
| 1k-array5 | 4750 | 0.211 | 32 | 5.1e-08 | 22 |
| 1k-hash1 | 4856.11 | 0.205926 | 32.7148 | 3.5e-11 | 20 |
| 1k-array1 | 6800 | 0.15 | 46 | 3.4e-07 | 31 |
| 1k-hash0 | 9957.38 | 0.100428 | 67.0812 | 0 | 20 |
| 1k-array0 | 11305.6 | 0.0884515 | 76.1641 | 0 | 20 |
+-------------+-----------+-----------+------------+---------+---------+
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.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenario-Allocations.
SOURCE
Source repository is at https://github.com/perlancar/perl-Bencher-Scenario-Allocations.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenario-Allocations
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) 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.