NAME Acme::CPANModules::TextTable - Modules that generate text tables VERSION This document describes version 0.004 of Acme::CPANModules::TextTable (from Perl distribution Acme-CPANModules-TextTable), released on 2020-08-10. SYNOPSIS To run benchmark with default option: % bencher --cpanmodules-module TextTable To run module startup overhead benchmark: % bencher --module-startup --cpanmodules-module TextTable For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run "bencher --help". BENCHMARKED MODULES Version numbers shown below are the versions used when running the sample benchmark. Text::ANSITable 0.501 Text::ASCIITable 0.22 Text::FormatTable 1.03 Text::MarkdownTable 0.3.1 Text::Table 1.133 Text::Table::Tiny 1.00 Text::Table::Sprintf 0.001 Text::Table::TinyColor 0.002 Text::Table::TinyColorWide 0.001 Text::Table::TinyWide 0.001 Text::Table::Org 0.02 Text::Table::CSV 0.023 Text::Table::HTML 0.003 Text::Table::HTML::DataTables 0.002 Text::TabularDisplay 1.38 BENCHMARK PARTICIPANTS * Text::ANSITable (perl_code) Text::ANSITable * Text::ASCIITable (perl_code) Text::ASCIITable * Text::FormatTable (perl_code) Text::FormatTable * Text::MarkdownTable (perl_code) Text::MarkdownTable * Text::Table (perl_code) Text::Table * Text::Table::Tiny (perl_code) Text::Table::Tiny * Text::Table::Sprintf (perl_code) Text::Table::Sprintf * Text::Table::TinyColor (perl_code) Text::Table::TinyColor * Text::Table::TinyColorWide (perl_code) Text::Table::TinyColorWide * Text::Table::TinyWide (perl_code) Text::Table::TinyWide * Text::Table::Org (perl_code) Text::Table::Org * Text::Table::CSV (perl_code) Text::Table::CSV * Text::Table::HTML (perl_code) Text::Table::HTML * Text::Table::HTML::DataTables (perl_code) Text::Table::HTML::DataTables * Text::TabularDisplay (perl_code) Text::TabularDisplay BENCHMARK DATASETS * tiny (1x1) * small (3x5) * wide (30x5) * long (3x300) * large (30x300) SAMPLE BENCHMARK RESULTS Run on: perl: *v5.30.0*, CPU: *Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (2 cores)*, OS: *GNU/Linux Ubuntu version 19.10*, OS kernel: *Linux version 5.3.0-62-generic*. Benchmark with default options ("bencher --cpanmodules-module TextTable"): #table1# {dataset=>"large (30x300)"} +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+ | participant | rate (/s) | time (ms) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+ | Text::ANSITable | 2.6 | 380 | 0.00% | 16761.03% | 0.0015 | 20 | | Text::ASCIITable | 11 | 87 | 333.66% | 3788.05% | 0.00039 | 20 | | Text::Table::TinyColorWide | 16 | 61 | 520.35% | 2617.98% | 0.00024 | 20 | | Text::FormatTable | 18 | 57 | 567.02% | 2427.81% | 0.00021 | 20 | | Text::Table::TinyWide | 23 | 43 | 783.26% | 1808.95% | 0.00022 | 20 | | Text::TabularDisplay | 40 | 20 | 1499.37% | 954.23% | 0.00026 | 20 | | Text::Table::TinyColor | 61 | 16 | 2204.74% | 631.58% | 0.00012 | 20 | | Text::Table::Tiny | 67 | 15 | 2451.72% | 560.77% | 3.5e-05 | 21 | | Text::MarkdownTable | 89 | 11 | 3273.84% | 399.76% | 3.1e-05 | 20 | | Text::Table | 110 | 9 | 4102.66% | 301.20% | 4.4e-05 | 20 | | Text::Table::HTML::DataTables | 120 | 8.2 | 4530.68% | 264.12% | 3.9e-05 | 20 | | Text::Table::HTML | 120 | 8.1 | 4547.02% | 262.84% | 3.8e-05 | 20 | | Text::Table::CSV | 220 | 4.6 | 8082.09% | 106.07% | 2.2e-05 | 20 | | Text::Table::Org | 220 | 4.5 | 8294.84% | 100.85% | 3.4e-05 | 20 | | Text::Table::Sprintf | 450 | 2.2 | 16761.03% | 0.00% | 1.6e-05 | 20 | +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+ #table2# {dataset=>"long (3x300)"} +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+ | participant | rate (/s) | time (ms) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+ | Text::ANSITable | 25 | 40 | 0.00% | 12440.24% | 0.00015 | 20 | | Text::ASCIITable | 120 | 8.5 | 364.79% | 2598.03% | 6.2e-05 | 21 | | Text::FormatTable | 160 | 6.3 | 531.87% | 1884.61% | 1.5e-05 | 20 | | Text::Table::TinyColorWide | 160 | 6.2 | 541.51% | 1854.80% | 3.5e-05 | 20 | | Text::Table::TinyWide | 240 | 4.2 | 834.16% | 1242.40% | 1.1e-05 | 20 | | Text::TabularDisplay | 340 | 3 | 1225.24% | 846.26% | 1.9e-05 | 21 | | Text::MarkdownTable | 430 | 2.3 | 1584.10% | 644.63% | 1.5e-05 | 20 | | Text::Table | 500 | 2 | 1863.78% | 538.58% | 1.1e-05 | 20 | | Text::Table::Tiny | 590 | 1.7 | 2227.61% | 438.76% | 2.9e-06 | 20 | | Text::Table::TinyColor | 590 | 1.7 | 2240.66% | 435.76% | 1.3e-05 | 20 | | Text::Table::HTML::DataTables | 970 | 1 | 3725.85% | 227.78% | 7.6e-06 | 20 | | Text::Table::HTML | 1000 | 0.96 | 4016.61% | 204.63% | 4.5e-06 | 20 | | Text::Table::CSV | 1800 | 0.57 | 6889.39% | 79.42% | 6.9e-07 | 20 | | Text::Table::Org | 1800 | 0.556 | 7009.65% | 76.38% | 4.8e-07 | 20 | | Text::Table::Sprintf | 3200 | 0.32 | 12440.24% | 0.00% | 6.8e-07 | 21 | +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+ #table3# {dataset=>"small (3x5)"} +-------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+ | participant | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +-------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+ | Text::ANSITable | 960 | 1000 | 0.00% | 9820.22% | 8.7e-06 | 20 | | Text::ASCIITable | 4900 | 210 | 406.80% | 1857.42% | 9.1e-07 | 20 | | Text::FormatTable | 6900 | 140 | 617.83% | 1281.97% | 4.8e-07 | 20 | | Text::Table::TinyColorWide | 7500 | 130 | 682.13% | 1168.37% | 8.5e-07 | 20 | | Text::Table | 7700 | 130 | 698.19% | 1142.83% | 1.9e-07 | 24 | | Text::Table::TinyWide | 11000 | 91 | 1037.74% | 771.93% | 2.1e-07 | 20 | | Text::MarkdownTable | 12000 | 81 | 1191.67% | 668.02% | 9.4e-08 | 26 | | Text::TabularDisplay | 15000 | 66 | 1486.35% | 525.35% | 9.5e-08 | 25 | | Text::Table::Tiny | 21000 | 48 | 2049.30% | 361.55% | 1.1e-07 | 20 | | Text::Table::HTML::DataTables | 23000 | 43 | 2292.39% | 314.66% | 6.7e-08 | 20 | | Text::Table::TinyColor | 24000 | 41 | 2409.65% | 295.28% | 5.3e-08 | 20 | | Text::Table::HTML | 47000 | 21 | 4808.67% | 102.10% | 2.7e-08 | 20 | | Text::Table::Org | 55000 | 18.2 | 5624.03% | 73.31% | 6.7e-09 | 20 | | Text::Table::CSV | 77523 | 12.899 | 7961.45% | 23.06% | 2.3e-11 | 20 | | Text::Table::Sprintf | 95000 | 10 | 9820.22% | 0.00% | 1.3e-08 | 20 | +-------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+ #table4# {dataset=>"tiny (1x1)"} +-------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+ | participant | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +-------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+ | Text::ANSITable | 3700 | 270 | 0.00% | 7771.18% | 1.1e-06 | 20 | | Text::ASCIITable | 17000 | 58 | 368.96% | 1578.42% | 1.3e-07 | 20 | | Text::Table | 20000 | 49 | 453.69% | 1321.57% | 1.6e-07 | 20 | | Text::MarkdownTable | 25000 | 41 | 565.30% | 1083.10% | 1e-07 | 21 | | Text::FormatTable | 34000 | 29 | 829.44% | 746.88% | 6.5e-08 | 21 | | Text::Table::HTML::DataTables | 37000 | 27 | 886.46% | 697.92% | 5.1e-08 | 22 | | Text::Table::TinyWide | 40000 | 20 | 1056.14% | 580.82% | 7.4e-07 | 22 | | Text::Table::TinyColorWide | 44000 | 23 | 1081.99% | 565.92% | 2.7e-08 | 20 | | Text::TabularDisplay | 61000 | 16 | 1550.59% | 376.87% | 2.7e-08 | 20 | | Text::Table::Tiny | 64000 | 16 | 1633.92% | 353.95% | 5.3e-08 | 20 | | Text::Table::TinyColor | 92600 | 10.8 | 2401.55% | 214.65% | 9.5e-09 | 22 | | Text::Table::Org | 148000 | 6.75 | 3902.12% | 96.68% | 3.3e-09 | 20 | | Text::Table::HTML | 185000 | 5.41 | 4892.61% | 57.66% | 1.5e-09 | 25 | | Text::Table::Sprintf | 280000 | 3.6 | 7417.74% | 4.70% | 6.4e-09 | 22 | | Text::Table::CSV | 290000 | 3.4 | 7771.18% | 0.00% | 5e-09 | 20 | +-------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+ #table5# {dataset=>"wide (30x5)"} +-------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+ | participant | rate (/s) | time (ms) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +-------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+ | Text::ANSITable | 120 | 8.3 | 0.00% | 11903.43% | 3.2e-05 | 20 | | Text::ASCIITable | 530 | 1.9 | 336.04% | 2652.85% | 3e-06 | 20 | | Text::FormatTable | 730 | 1.4 | 504.55% | 1885.52% | 2.9e-06 | 20 | | Text::Table::TinyColorWide | 870 | 1.2 | 615.28% | 1578.15% | 2.7e-06 | 20 | | Text::Table | 1200 | 0.83 | 888.71% | 1114.04% | 1.1e-06 | 20 | | Text::Table::TinyWide | 1200 | 0.82 | 905.59% | 1093.68% | 3.2e-06 | 20 | | Text::Table::TinyColor | 1600 | 0.64 | 1180.37% | 837.49% | 4.2e-06 | 20 | | Text::TabularDisplay | 2310 | 0.432 | 1810.35% | 528.34% | 4.3e-07 | 20 | | Text::Table::Tiny | 3070 | 0.326 | 2430.80% | 374.29% | 2.1e-07 | 20 | | Text::MarkdownTable | 3600 | 0.28 | 2859.84% | 305.54% | 6.4e-07 | 20 | | Text::Table::HTML::DataTables | 5660 | 0.177 | 4568.99% | 157.09% | 5.2e-08 | 21 | | Text::Table::HTML | 6400 | 0.16 | 5220.86% | 125.59% | 2e-07 | 23 | | Text::Table::Org | 9070 | 0.11 | 7383.21% | 60.40% | 5.3e-08 | 20 | | Text::Table::CSV | 11900 | 0.0837 | 9756.52% | 21.78% | 2.7e-08 | 20 | | Text::Table::Sprintf | 15000 | 0.069 | 11903.43% | 0.00% | 8e-08 | 20 | +-------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+ Benchmark module startup overhead ("bencher --cpanmodules-module TextTable --module-startup"): #table6# +-------------------------------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+ | participant | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples | +-------------------------------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+ | Text::ANSITable | 53 | 45 | 0.00% | 571.81% | 0.00026 | 20 | | Text::MarkdownTable | 45 | 37 | 18.67% | 466.09% | 0.0003 | 20 | | Text::Table::TinyColorWide | 33 | 25 | 61.65% | 315.61% | 8.6e-05 | 20 | | Text::Table::TinyWide | 31 | 23 | 72.49% | 289.49% | 0.00016 | 20 | | Text::Table | 23 | 15 | 135.78% | 184.93% | 7e-05 | 20 | | Text::ASCIITable | 18 | 10 | 199.24% | 124.51% | 5.8e-05 | 20 | | Text::Table::Tiny | 15 | 7 | 252.52% | 90.57% | 2.1e-05 | 20 | | Text::FormatTable | 15 | 7 | 265.13% | 83.99% | 5.5e-05 | 21 | | Text::Table::TinyColor | 14 | 6 | 286.37% | 73.88% | 3.5e-05 | 20 | | Text::TabularDisplay | 10.6 | 2.6 | 402.33% | 33.74% | 1.1e-05 | 20 | | Text::Table::HTML::DataTables | 10 | 2 | 410.17% | 31.68% | 6.3e-05 | 20 | | Text::Table::HTML | 9.85 | 1.85 | 442.91% | 23.74% | 9.2e-06 | 20 | | Text::Table::Sprintf | 8.5 | 0.5 | 532.31% | 6.25% | 3.9e-05 | 20 | | Text::Table::CSV | 8.4 | 0.4 | 539.98% | 4.97% | 2.2e-05 | 20 | | Text::Table::Org | 8.2 | 0.199999999999999 | 548.17% | 3.65% | 1.9e-05 | 21 | | perl -e1 (baseline) | 8 | 0 | 571.81% | 0.00% | 6.7e-05 | 20 | +-------------------------------+-----------+--------------------+-----------------------+-----------------------+-----------+---------+ To display as an interactive HTML table on a browser, you can add option "--format html+datatables". FEATURE COMPARISON MATRIX +-------------------------------+--------------+-----------+---------------+ | module | box_char *1) | color *2) | wide_char *3) | +-------------------------------+--------------+-----------+---------------+ | Text::ANSITable | yes | yes | yes | | Text::ASCIITable | no | no | no | | Text::FormatTable | no | no | no | | Text::MarkdownTable | no | no | no | | Text::Table | N/A *4) | no | no | | Text::Table::Tiny | no | yes | no | | Text::Table::Sprintf | no | no | no | | Text::Table::TinyColor | no | yes | no | | Text::Table::TinyColorWide | no | yes | yes | | Text::Table::TinyWide | no | no | yes | | Text::Table::Org | no | no | no | | Text::Table::CSV | N/A *5) | no | yes | | Text::Table::HTML | N/A | N/A | N/A | | Text::Table::HTML::DataTables | N/A | N/A | N/A | | Text::TabularDisplay | N/A *6) | no | yes | +-------------------------------+--------------+-----------+---------------+ Notes: 1. box_char: Whether the module can utilize box-drawing characters 2. color: Whether the module supports ANSI colors (i.e. text with ANSI color codes can still be aligned properly) 3. wide_char: Whether the use of wide characters (e.g. Kanji) in cells does not cause the table to be misaligned 4. Does not draw borders 5. Irrelevant 6. Irrelevant INCLUDED MODULES * Text::ANSITable * Text::ASCIITable * Text::FormatTable * Text::MarkdownTable * Text::Table * Text::Table::Tiny * Text::Table::Sprintf * Text::Table::TinyColor * Text::Table::TinyColorWide * Text::Table::TinyWide * Text::Table::Org * Text::Table::CSV * Text::Table::HTML * Text::Table::HTML::DataTables * Text::TabularDisplay FAQ What are ways to use this module? Aside from reading it, you can install all the listed modules using cpanmodules: % cpanmodules ls-entries TextTable | cpanm -n or Acme::CM::Get: % perl -MAcme::CM::Get=TextTable -E'say $_->{module} for @{ $LIST->{entries} }' | cpanm -n This module contains benchmark instructions. You can run a benchmark for some/all the modules listed in this Acme::CPANModules module using bencher: % bencher --cpanmodules-module TextTable This module also helps lcpan produce a more meaningful result for "lcpan related-mods" when it comes to finding related modules for the modules listed in this Acme::CPANModules module. HOMEPAGE Please visit the project's homepage at . SOURCE Source repository is at . BUGS Please report any bugs or feature requests on the bugtracker website 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 Acme::CPANModules - about the Acme::CPANModules namespace cpanmodules - CLI tool to let you browse/view the lists AUTHOR perlancar COPYRIGHT AND LICENSE This software is copyright (c) 2020, 2019 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.