From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

Bencher::Scenario::IODParsingModules - Benchmark IOD/INI parsing modules

VERSION

This document describes version 0.05 of Bencher::Scenario::IODParsingModules (from Perl distribution Bencher-Scenario-IODParsingModules), released on 2017-01-25.

SYNOPSIS

To run benchmark with default option:

% bencher -m IODParsingModules

To run module startup overhead benchmark:

% bencher --module-startup -m IODParsingModules

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.

Config::INI::Reader 0.025

Config::IOD 0.33

Config::IOD::Reader 0.32

Config::IniFiles 2.93

Config::Simple::Conf 2.002

BENCHMARK PARTICIPANTS

  • Config::IOD::Reader (perl_code)

    Code template:

    state $iod = Config::IOD::Reader->new; $iod->read_file(<filename>)
  • Config::IOD (perl_code)

    Code template:

    state $iod = Config::IOD->new; $iod->read_file(<filename>)
  • Config::INI::Reader (perl_code) [ini]

    Code template:

    Config::INI::Reader->read_file(<filename>)
  • Config::IniFiles (perl_code) [ini]

    Code template:

    Config::IniFiles->new(-file => <filename>)
  • Config::Simple::Conf (perl_code) [ini]

    Code template:

    Config::Simple::Conf->new(<filename>)

BENCHMARK DATASETS

  • extra-bench-basic-compat.iod

  • extra-bench-basic.iod

  • extra-bench-typical1.iod

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

#table1#
+----------------------+------------------------------+-----------+-----------+------------+---------+---------+
| participant | dataset | rate (/s) | time (ms) | vs_slowest | errors | samples |
+----------------------+------------------------------+-----------+-----------+------------+---------+---------+
| Config::IniFiles | extra-bench-basic-compat.iod | 230 | 4.3 | 1 | 4.9e-06 | 20 |
| Config::INI::Reader | extra-bench-basic-compat.iod | 840 | 1.2 | 3.6 | 2.2e-06 | 21 |
| Config::IOD | extra-bench-basic-compat.iod | 1100 | 0.92 | 4.7 | 1.5e-06 | 20 |
| Config::IOD | extra-bench-basic.iod | 1130 | 0.887 | 4.87 | 4.6e-07 | 22 |
| Config::IniFiles | extra-bench-typical1.iod | 1100 | 0.88 | 4.9 | 1.1e-06 | 20 |
| Config::IOD::Reader | extra-bench-basic-compat.iod | 1400 | 0.7 | 6.2 | 9.1e-07 | 20 |
| Config::IOD::Reader | extra-bench-basic.iod | 1400 | 0.7 | 6.2 | 9.1e-07 | 20 |
| Config::Simple::Conf | extra-bench-basic-compat.iod | 1600 | 0.64 | 6.8 | 1.1e-06 | 21 |
| Config::INI::Reader | extra-bench-typical1.iod | 4200 | 0.24 | 18 | 6.4e-07 | 20 |
| Config::IOD | extra-bench-typical1.iod | 4700 | 0.21 | 20 | 4.3e-07 | 20 |
| Config::Simple::Conf | extra-bench-typical1.iod | 6100 | 0.16 | 26 | 4.1e-07 | 28 |
| Config::IOD::Reader | extra-bench-typical1.iod | 7600 | 0.13 | 33 | 2.7e-07 | 20 |
+----------------------+------------------------------+-----------+-----------+------------+---------+---------+

Benchmark module startup overhead (bencher -m IODParsingModules --module-startup):

#table2#
+----------------------+------------------------------+--------------------+----------------+-----------+------------------------+------------+---------+---------+
| participant | proc_private_dirty_size (MB) | proc_rss_size (MB) | proc_size (MB) | time (ms) | mod_overhead_time (ms) | vs_slowest | errors | samples |
+----------------------+------------------------------+--------------------+----------------+-----------+------------------------+------------+---------+---------+
| Config::INI::Reader | 4.7 | 8.1 | 28 | 38 | 31.9 | 1 | 6.5e-05 | 20 |
| Config::IniFiles | 1 | 4.3 | 16 | 38 | 31.9 | 1 | 9e-05 | 20 |
| Config::IOD::Reader | 1.4 | 4.8 | 19 | 14 | 7.9 | 2.7 | 7.9e-05 | 20 |
| Config::IOD | 5.4 | 9.1 | 33 | 14 | 7.9 | 2.8 | 5.3e-05 | 21 |
| Config::Simple::Conf | 0.82 | 4 | 16 | 8.4 | 2.3 | 4.5 | 5.7e-05 | 21 |
| perl -e1 (baseline) | 1.5 | 4.8 | 19 | 6.1 | 0 | 6.2 | 3.8e-05 | 21 |
+----------------------+------------------------------+--------------------+----------------+-----------+------------------------+------------+---------+---------+

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-Scenario-IODParsingModules.

SOURCE

Source repository is at https://github.com/perlancar/perl-Bencher-Scenario-IODParsingModules.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenario-IODParsingModules

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