NAME

Bencher::Scenario::TextTableModules - Benchmark modules that generate text table

VERSION

This document describes version 0.07 of Bencher::Scenario::TextTableModules (from Perl distribution Bencher-Scenario-TextTableModules), released on 2016-10-19.

SYNOPSIS

To run benchmark with default option:

% bencher -m TextTableModules

To run module startup overhead benchmark:

% bencher --module-startup -m TextTableModules

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.

Text::ANSITable 0.48

Text::ASCIITable 0.20

Text::FormatTable 1.03

Text::MarkdownTable 0.3.1

Text::Table 1.131

Text::Table::Tiny 0.04

Text::Table::TinyColor 0.002

Text::Table::TinyColorWide 0.001

Text::Table::TinyWide 0.001

Text::Table::Org 0.02

Text::Table::CSV 0.01

Text::TabularDisplay 1.38

BENCHMARK PARTICIPANTS

BENCHMARK DATASETS

  • tiny (1x1)

  • small (3x5)

  • wide (30x5)

  • long (3x300)

  • large (30x300)

SAMPLE BENCHMARK RESULTS

Run on: perl: v5.24.0, CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz (4 cores), OS: GNU/Linux Debian version 8.0, OS kernel: Linux version 3.16.0-4-amd64.

Benchmark with default options (bencher -m TextTableModules):

#table1#
{dataset=>"large (30x300)"}
+----------------------------+-----------+-----------+------------+-----------+---------+
| participant                | rate (/s) | time (ms) | vs_slowest |  errors   | samples |
+----------------------------+-----------+-----------+------------+-----------+---------+
| Text::ANSITable            |       2.1 |     480   |       1    |   0.00054 |      20 |
| Text::ASCIITable           |       4.5 |     220   |       2.1  |   0.00033 |      21 |
| Text::Table::TinyColorWide |      10   |      99.9 |       4.76 | 9.9e-05   |      21 |
| Text::FormatTable          |      12   |      83   |       5.7  |   0.00016 |      20 |
| Text::Table::TinyWide      |      15   |      66   |       7.2  | 6.8e-05   |      20 |
| Text::TabularDisplay       |      29   |      35   |      14    | 3.6e-05   |      20 |
| Text::Table::TinyColor     |      44   |      23   |      21    | 2.5e-05   |      20 |
| Text::MarkdownTable        |      71   |      14   |      34    | 8.5e-05   |      21 |
| Text::Table                |      98.6 |      10.1 |      46.9  | 9.6e-06   |      20 |
| Text::Table::CSV           |     160   |       6.1 |      78    | 4.4e-05   |      20 |
| Text::Table::Org           |     220   |       4.6 |     100    | 7.4e-06   |      20 |
| Text::Table::Tiny          |     250   |       4   |     120    | 6.9e-06   |      20 |
+----------------------------+-----------+-----------+------------+-----------+---------+

#table2#
{dataset=>"long (3x300)"}
+----------------------------+-----------+-----------+------------+---------+---------+
| participant                | rate (/s) | time (ms) | vs_slowest |  errors | samples |
+----------------------------+-----------+-----------+------------+---------+---------+
| Text::ANSITable            |      19.1 |    52.3   |       1    | 4.5e-05 |      20 |
| Text::ASCIITable           |      45.3 |    22.1   |       2.37 |   2e-05 |      20 |
| Text::Table::TinyColorWide |      94.9 |    10.5   |       4.97 | 4.5e-06 |      20 |
| Text::FormatTable          |     102   |     9.8   |       5.34 | 9.7e-06 |      22 |
| Text::Table::TinyWide      |     143   |     7     |       7.47 | 6.7e-06 |      20 |
| Text::TabularDisplay       |     190   |     5.2   |      10    | 5.2e-06 |      21 |
| Text::MarkdownTable        |     310   |     3.2   |      16    | 9.4e-06 |      21 |
| Text::Table                |     390   |     2.6   |      20    | 2.9e-06 |      20 |
| Text::Table::TinyColor     |     390   |     2.5   |      21    | 5.2e-06 |      20 |
| Text::Table::CSV           |    1300   |     0.77  |      68    | 1.8e-06 |      21 |
| Text::Table::Org           |    1590   |     0.628 |      83.3  | 4.8e-07 |      20 |
| Text::Table::Tiny          |    1820   |     0.549 |      95.2  | 2.1e-07 |      20 |
+----------------------------+-----------+-----------+------------+---------+---------+

#table3#
{dataset=>"small (3x5)"}
+----------------------------+-----------+-----------+------------+---------+---------+
| participant                | rate (/s) | time (μs) | vs_slowest |  errors | samples |
+----------------------------+-----------+-----------+------------+---------+---------+
| Text::ANSITable            |    770    |  1300     |    1       | 2.7e-06 |      21 |
| Text::ASCIITable           |   1940    |   514     |    2.54    | 2.1e-07 |      20 |
| Text::Table::TinyColorWide |   4400    |   230     |    5.7     | 4.3e-07 |      20 |
| Text::FormatTable          |   4460    |   224     |    5.83    | 1.6e-07 |      20 |
| Text::Table                |   5728.87 |   174.554 |    7.48586 | 1.6e-10 |      21 |
| Text::Table::TinyWide      |   6120    |   163     |    8       | 5.3e-08 |      20 |
| Text::TabularDisplay       |   8340    |   120     |   10.9     | 5.3e-08 |      20 |
| Text::MarkdownTable        |   9000    |   110     |   12       | 1.6e-07 |      20 |
| Text::Table::TinyColor     |  15300    |    65.3   |   20       | 2.7e-08 |      20 |
| Text::Table::Org           |  39000    |    25     |   52       | 9.8e-08 |      21 |
| Text::Table::Tiny          |  41200    |    24.3   |   53.8     |   2e-08 |      20 |
| Text::Table::CSV           |  52000    |    19     |   68       | 3.3e-08 |      20 |
+----------------------------+-----------+-----------+------------+---------+---------+

#table4#
{dataset=>"tiny (1x1)"}
+----------------------------+-----------+-----------+------------+---------+---------+
| participant                | rate (/s) | time (μs) | vs_slowest |  errors | samples |
+----------------------------+-----------+-----------+------------+---------+---------+
| Text::ANSITable            |      3200 |     320   |       1    | 4.3e-07 |      20 |
| Text::ASCIITable           |      8000 |     120   |       2.5  | 2.1e-07 |      20 |
| Text::Table                |     15100 |      66.1 |       4.78 | 2.7e-08 |      20 |
| Text::MarkdownTable        |     17900 |      55.8 |       5.67 | 2.5e-08 |      23 |
| Text::FormatTable          |     21400 |      46.7 |       6.78 | 1.3e-08 |      20 |
| Text::Table::TinyColorWide |     26000 |      38   |       8.2  | 5.3e-08 |      20 |
| Text::Table::TinyWide      |     32000 |      31   |      10    | 5.3e-08 |      20 |
| Text::TabularDisplay       |     33000 |      30   |      10    | 5.2e-08 |      21 |
| Text::Table::TinyColor     |     54000 |      19   |      17    | 2.7e-08 |      20 |
| Text::Table::Tiny          |     80900 |      12.4 |      25.6  |   1e-08 |      20 |
| Text::Table::Org           |     86000 |      12   |      27    | 1.3e-08 |      20 |
| Text::Table::CSV           |    170000 |       5.9 |      53    | 6.5e-09 |      21 |
+----------------------------+-----------+-----------+------------+---------+---------+

#table5#
{dataset=>"wide (30x5)"}
+----------------------------+-----------+-----------+------------+---------+---------+
| participant                | rate (/s) | time (ms) | vs_slowest |  errors | samples |
+----------------------------+-----------+-----------+------------+---------+---------+
| Text::ANSITable            |      94.6 |    10.6   |       1    | 1.1e-05 |      20 |
| Text::ASCIITable           |     210   |     4.8   |       2.2  | 1.1e-05 |      20 |
| Text::FormatTable          |     480   |     2.1   |       5.1  | 3.2e-06 |      21 |
| Text::Table::TinyColorWide |     490   |     2     |       5.2  | 2.2e-06 |      20 |
| Text::Table::TinyWide      |     710   |     1.4   |       7.5  | 2.6e-06 |      24 |
| Text::Table                |     801   |     1.25  |       8.47 | 1.2e-06 |      22 |
| Text::TabularDisplay       |    1400   |     0.72  |      15    | 1.3e-06 |      20 |
| Text::Table::TinyColor     |    2100   |     0.48  |      22    |   9e-07 |      28 |
| Text::MarkdownTable        |    2680   |     0.372 |      28.4  | 2.6e-07 |      21 |
| Text::Table::Org           |    7200   |     0.14  |      76    | 2.7e-07 |      20 |
| Text::Table::Tiny          |    8120   |     0.123 |      85.9  | 4.2e-08 |      33 |
| Text::Table::CSV           |    8900   |     0.112 |      94.1  | 5.2e-08 |      21 |
+----------------------------+-----------+-----------+------------+---------+---------+

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

#table6#
+----------------------------+-----------+------------------------+------------+-----------+---------+
| participant                | time (ms) | mod_overhead_time (ms) | vs_slowest |  errors   | samples |
+----------------------------+-----------+------------------------+------------+-----------+---------+
| Text::ANSITable            |      59   |    53                  |        1   |   0.00019 |      21 |
| Text::MarkdownTable        |      48   |    42                  |        1.2 |   0.00023 |      20 |
| Text::Table::TinyColorWide |      47   |    41                  |        1.2 |   0.00044 |      22 |
| Text::Table::TinyWide      |      42   |    36                  |        1.4 |   0.00011 |      21 |
| Text::ASCIITable           |      23   |    17                  |        2.6 |   0.00011 |      20 |
| Text::Table                |      23   |    17                  |        2.6 |   0.00014 |      20 |
| Text::Table::TinyColor     |      13   |     7                  |        4.5 | 2.7e-05   |      20 |
| Text::FormatTable          |      13   |     7                  |        4.5 | 4.4e-05   |      20 |
| Text::Table::Tiny          |      11   |     5                  |        5.4 | 3.2e-05   |      20 |
| Text::TabularDisplay       |       9.3 |     3.3                |        6.3 | 3.3e-05   |      20 |
| Text::Table::Org           |       6.5 |     0.5                |        9.1 | 1.8e-05   |      20 |
| perl -e1 (baseline)        |       6   |     0                  |       10   | 9.4e-05   |      21 |
| Text::Table::CSV           |       5.9 |    -0.0999999999999996 |       10   | 4.5e-05   |      20 |
+----------------------------+-----------+------------------------+------------+-----------+---------+

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenario-TextTableModules.

SOURCE

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

BUGS

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

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.