NAME
Bencher::Scenario::Accessors::GeneratorStartup - Benchmark startup of various accessor generators
VERSION
This document describes version 0.14 of Bencher::Scenario::Accessors::GeneratorStartup (from Perl distribution Bencher-Scenarios-Accessors), released on 2017-01-25.
SYNOPSIS
To run benchmark with default option:
% bencher -m Accessors::GeneratorStartup
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.
Class::Accessor 0.34
Class::InsideOut 1.13
Class::Struct 0.65
Class::Tiny 1.004
Class::XSAccessor 1.19
Mo 0.40
Mojo::Base::XS 0.07
Moo 2.002004
Moops 0.034
Moos 0.30
Moose 2.1805
Mouse v2.4.5
Object::Simple 3.17
Object::Tiny 1.08
Object::Tiny::RW 1.07
Object::Tiny::RW::XS 0.03
Object::Tiny::XS 1.01
Simple::Accessor 1.02
BENCHMARK PARTICIPANTS
Class::Tiny (perl_code)
Moo (perl_code)
Object::Tiny::XS (perl_code)
(perl_code)
Object::Tiny (perl_code)
Class::XSAccessor (perl_code)
Class::InsideOut (perl_code)
(perl_code)
Object::Tiny::RW::XS (perl_code)
Mouse (perl_code)
Object::Simple (perl_code)
Moos (perl_code)
Mo (perl_code)
Mojo::Base (perl_code)
(perl_code)
Simple::Accessor (perl_code)
Class::Struct (perl_code)
Object::Tiny::RW (perl_code)
Class::Accessor::Array (perl_code)
Class::Accessor (perl_code)
Moops (perl_code)
Mojo::Base::XS (perl_code)
Moose (perl_code)
Class::XSAccessor::Array (perl_code)
Evo::Class (perl_code)
SAMPLE BENCHMARK RESULTS
Run on: perl: v5.24.0, CPU: Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz (2 cores), OS: GNU/Linux LinuxMint version 17.3, OS kernel: Linux version 3.19.0-32-generic.
Benchmark with default options (bencher -m Accessors::GeneratorStartup
):
#table1#
+--------------------------+------------------------------+--------------------+----------------+-----------+------------------------+------------+-----------+---------+
| participant | proc_private_dirty_size (MB) | proc_rss_size (MB) | proc_size (MB) | time (ms) | mod_overhead_time (ms) | vs_slowest | errors | samples |
+--------------------------+------------------------------+--------------------+----------------+-----------+------------------------+------------+-----------+---------+
| Moose | 5 | 8.8 | 43 | 150 | 145.2 | 1 | 0.00038 | 20 |
| Moops | 0.85 | 4.2 | 16 | 67 | 62.2 | 2.2 | 0.00017 | 20 |
| Evo::Class | 14 | 18 | 50 | 36 | 31.2 | 4.2 | 0.00015 | 20 |
| Mouse | 1.4 | 4.9 | 19 | 24 | 19.2 | 6.3 | 0.0001 | 21 |
| Moos | 1.4 | 4.9 | 19 | 20 | 15.2 | 7.7 | 0.00012 | 20 |
| Moo | 1.4 | 4.8 | 19 | 19 | 14.2 | 8.1 | 5.8e-05 | 20 |
| Class::InsideOut | 1.8 | 5.3 | 19 | 15 | 10.2 | 9.8 | 5.7e-05 | 20 |
| Mojo::Base | 0.86 | 4.1 | 16 | 15 | 10.2 | 9.9 | 7.6e-05 | 20 |
| Class::Tiny | 2.1 | 5.5 | 21 | 14 | 9.2 | 11 | 2e-05 | 20 |
| Class::Struct | 0.82 | 4.1 | 16 | 12 | 7.2 | 12 | 5.8e-05 | 20 |
| Class::XSAccessor::Array | 0.91 | 4.3 | 18 | 12 | 7.2 | 13 | 7.1e-05 | 20 |
| Object::Tiny::RW::XS | 0.82 | 4.1 | 16 | 12 | 7.2 | 13 | 7.5e-05 | 20 |
| Object::Simple | 3.1 | 6.6 | 24 | 12 | 7.2 | 13 | 7.9e-05 | 20 |
| Object::Tiny::XS | 0.82 | 4.1 | 16 | 12 | 7.2 | 13 | 5.2e-05 | 20 |
| Class::Accessor | 0.86 | 4.2 | 16 | 11 | 6.2 | 13 | 8.8e-05 | 20 |
| Class::XSAccessor | 1.4 | 4.8 | 19 | 11 | 6.2 | 13 | 0.0001 | 20 |
| Mojo::Base::XS | 1.4 | 4.8 | 19 | 8.4 | 3.6 | 18 | 3e-05 | 20 |
| Simple::Accessor | 1.8 | 5.2 | 21 | 7.5 | 2.7 | 20 | 3.1e-05 | 20 |
| Mo | 2.3 | 5.8 | 26 | 6.9 | 2.1 | 22 | 3.4e-05 | 20 |
| Class::Accessor::Array | 1.4 | 4.7 | 17 | 6.9 | 2.1 | 22 | 2.9e-05 | 20 |
| Object::Tiny | 0.86 | 4.3 | 16 | 5.9 | 1.1 | 26 | 2e-05 | 21 |
| Object::Tiny::RW | 0.88 | 4.2 | 16 | 5.8 | 1 | 26 | 2.4e-05 | 21 |
| perl -e1 (baseline) | 1.7 | 5.1 | 19 | 4.8 | 0 | 32 | 1.3e-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-Accessors.
SOURCE
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-Accessors.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-Accessors
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) 2017 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.