NAME

Bencher::Scenario::Accessors::ClassStartup - Benchmark startup of classes using various accessor generators

VERSION

This document describes version 0.14 of Bencher::Scenario::Accessors::ClassStartup (from Perl distribution Bencher-Scenarios-Accessors), released on 2017-01-25.

SYNOPSIS

To run benchmark with default option:

% bencher -m Accessors::ClassStartup

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::Accessor::Array 0.02

Class::InsideOut 1.13

Class::Struct 0.65

Class::Tiny 1.004

Class::XSAccessor 1.19

Class::XSAccessor::Array 1.19

Evo::Class

Mo 0.40

Mojo::Base

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

Perl::Examples::Accessors::Array 0.12

Perl::Examples::Accessors::ClassAccessor 0.12

Perl::Examples::Accessors::ClassAccessorArray 0.12

Perl::Examples::Accessors::ClassInsideOut 0.12

Perl::Examples::Accessors::ClassStruct 0.12

Perl::Examples::Accessors::ClassTiny 0.12

Perl::Examples::Accessors::ClassXSAccessor 0.12

Perl::Examples::Accessors::ClassXSAccessorArray 0.12

Perl::Examples::Accessors::EvoClass 0.12

Perl::Examples::Accessors::Hash 0.12

Perl::Examples::Accessors::Mo 0.12

Perl::Examples::Accessors::MojoBase 0.12

Perl::Examples::Accessors::MojoBaseXS 0.12

Perl::Examples::Accessors::Moo 0.12

Perl::Examples::Accessors::Moops 0.12

Perl::Examples::Accessors::Moos 0.12

Perl::Examples::Accessors::Moose 0.12

Perl::Examples::Accessors::Mouse 0.12

Perl::Examples::Accessors::ObjectSimple 0.12

Perl::Examples::Accessors::ObjectTiny 0.12

Perl::Examples::Accessors::ObjectTinyRW 0.12

Perl::Examples::Accessors::ObjectTinyRWXS 0.12

Perl::Examples::Accessors::ObjectTinyXS 0.12

Perl::Examples::Accessors::Scalar 0.12

Perl::Examples::Accessors::SimpleAccessor 0.12

Simple::Accessor 1.02

BENCHMARK PARTICIPANTS

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::ClassStartup):

#table1#
+-------------------------------------------------+------------------------------+--------------------+----------------+-----------+------------------------+------------+-----------+---------+
| participant                                     | proc_private_dirty_size (MB) | proc_rss_size (MB) | proc_size (MB) | time (ms) | mod_overhead_time (ms) | vs_slowest |  errors   | samples |
+-------------------------------------------------+------------------------------+--------------------+----------------+-----------+------------------------+------------+-----------+---------+
| Perl::Examples::Accessors::Moops                | 0.92                         | 4.3                | 18             |     170   |                  165.4 |        1   |   0.00021 |      21 |
| Perl::Examples::Accessors::Moose                | 1.5                          | 4.9                | 19             |     160   |                  155.4 |        1.1 |   0.00037 |      20 |
| Perl::Examples::Accessors::EvoClass             | 0.82                         | 4.1                | 16             |      36   |                   31.4 |        4.7 |   7e-05   |      20 |
| Perl::Examples::Accessors::Moo                  | 1.4                          | 4.8                | 19             |      30   |                   25.4 |        5.6 | 4.4e-05   |      20 |
| Perl::Examples::Accessors::Mouse                | 1.4                          | 4.8                | 19             |      24   |                   19.4 |        6.9 |   7e-05   |      20 |
| Perl::Examples::Accessors::Moos                 | 0.88                         | 4.1                | 16             |      19   |                   14.4 |        8.6 | 4.5e-05   |      22 |
| Perl::Examples::Accessors::ClassInsideOut       | 0.84                         | 4.2                | 16             |      16   |                   11.4 |       10   | 8.1e-05   |      21 |
| Perl::Examples::Accessors::MojoBase             | 0.84                         | 4.1                | 16             |      15   |                   10.4 |       11   | 7.7e-05   |      21 |
| Perl::Examples::Accessors::ClassTiny            | 3.8                          | 7.3                | 27             |      14   |                    9.4 |       12   | 4.8e-05   |      20 |
| Perl::Examples::Accessors::ClassStruct          | 0.88                         | 4.3                | 16             |      12   |                    7.4 |       13   |   5e-05   |      22 |
| Perl::Examples::Accessors::ObjectSimple         | 2.3                          | 5.8                | 26             |      12   |                    7.4 |       14   | 4.5e-05   |      22 |
| Perl::Examples::Accessors::ClassXSAccessorArray | 4.1                          | 7.6                | 27             |      12   |                    7.4 |       14   | 3.3e-05   |      20 |
| Perl::Examples::Accessors::ObjectTinyXS         | 0.83                         | 4.1                | 16             |      12   |                    7.4 |       14   | 4.9e-05   |      20 |
| Perl::Examples::Accessors::ClassAccessor        | 16                           | 20                 | 76             |      12   |                    7.4 |       14   | 6.6e-05   |      20 |
| Perl::Examples::Accessors::ClassXSAccessor      | 1.9                          | 5.2                | 19             |      11   |                    6.4 |       15   | 6.7e-05   |      20 |
| Perl::Examples::Accessors::ObjectTinyRWXS       | 3.2                          | 6.6                | 24             |      11   |                    6.4 |       15   | 1.7e-05   |      20 |
| Perl::Examples::Accessors::MojoBaseXS           | 15                           | 18                 | 50             |       8.3 |                    3.7 |       20   | 1.7e-05   |      20 |
| Perl::Examples::Accessors::SimpleAccessor       | 1.5                          | 5                  | 17             |       7.4 |                    2.8 |       23   | 2.8e-05   |      20 |
| Perl::Examples::Accessors::Mo                   | 1.8                          | 5.2                | 21             |       7   |                    2.4 |       24   | 1.2e-05   |      20 |
| Perl::Examples::Accessors::ClassAccessorArray   | 1.4                          | 4.8                | 19             |       7   |                    2.4 |       24   |   3e-05   |      20 |
| Perl::Examples::Accessors::ObjectTinyRW         | 0.88                         | 4.3                | 16             |       5.8 |                    1.2 |       29   | 2.5e-05   |      20 |
| Perl::Examples::Accessors::ObjectTiny           | 1.4                          | 4.8                | 19             |       5.7 |                    1.1 |       29   | 2.1e-05   |      20 |
| Perl::Examples::Accessors::Scalar               | 0.88                         | 4.2                | 16             |       5.1 |                    0.5 |       33   | 2.3e-05   |      20 |
| Perl::Examples::Accessors::Hash                 | 1.4                          | 4.9                | 19             |       5   |                    0.4 |       33   | 1.4e-05   |      20 |
| Perl::Examples::Accessors::Array                | 0.89                         | 4.2                | 16             |       5   |                    0.4 |       33   | 8.7e-06   |      20 |
| perl -e1 (baseline)                             | 1.7                          | 5.2                | 19             |       4.6 |                    0   |       36   | 5.3e-06   |      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.