Acme-CPANModules-TextTable

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

        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)

    *   multiline data (2x1) (not included by default)

    *   wide char data (1x2) (not included by default)

    *   color data (1x2) (not included by default)

BENCHMARK SAMPLE RESULTS
  Sample benchmark #1
    Run on: perl: *v5.38.0*, CPU: *Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
    (2 cores)*, OS: *GNU/Linux Ubuntu version 20.04*, OS kernel: *Linux
    version 5.4.0-164-generic*.

    Benchmark command (default options):

     % bencher --cpanmodules-module TextTable

    Result formatted as table (split, part 1 of 5):

     #table1#
     {dataset=>"large (30x300)"}
     +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+
     | participant                   | rate (/s) | time (ms) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors   | samples |
     +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+
     | Text::UnicodeBox::Table       |      0.92 |    1100   |                 0.00% |             35566.44% |   0.0024  |      20 |
     | Text::ANSITable               |      1.8  |     560   |                94.68% |             18220.90% |   0.0012  |      20 |
     | Text::Table::More             |      2.5  |     400   |               167.94% |             13211.33% |   0.00094 |      20 |
     | Text::ASCIITable              |      9.6  |     100   |               934.43% |              3347.94% |   0.00076 |      20 |
     | Text::Table::TinyColorWide    |     10    |      70   |              1365.67% |              2333.45% |   0.0008  |      20 |
     | Text::FormatTable             |     15    |      69   |              1474.71% |              2164.95% |   0.00063 |      20 |
     | Text::Table::TinyWide         |     20    |      50   |              1927.24% |              1659.36% |   0.00058 |      20 |
     | Text::SimpleTable             |     26    |      38   |              2719.79% |              1164.86% |   0.00033 |      20 |
     | Text::Table::Manifold         |     30    |      30   |              3432.47% |               909.67% |   0.00039 |      20 |
     | Text::Table::Tiny             |     30    |      30   |              3660.87% |               848.36% |   0.00043 |      20 |
     | Text::TabularDisplay          |     40    |      30   |              4123.89% |               744.40% |   0.00046 |      20 |
     | Text::Table::HTML             |     50    |      20   |              4776.96% |               631.33% |   0.00036 |      20 |
     | Text::Table::TinyColor        |     50    |      20   |              5139.30% |               580.75% |   0.00056 |      20 |
     | Text::MarkdownTable           |     60    |      20   |              6854.90% |               412.82% |   0.00035 |      20 |
     | Text::Table                   |     90    |      10   |              9175.49% |               284.52% |   0.00026 |      20 |
     | Text::Table::HTML::DataTables |    100    |      10   |             10410.10% |               239.35% |   0.00018 |      20 |
     | Text::Table::TinyBorderStyle  |    200    |       6   |             19509.01% |                81.89% |   0.00011 |      20 |
     | Text::Table::Org              |    200    |       5   |             20190.87% |                75.78% |   0.00013 |      20 |
     | Text::Table::CSV              |    200    |       4.9 |             21769.21% |                63.09% | 4.3e-05   |      20 |
     | Text::Table::Sprintf          |    300    |       4   |             28690.71% |                23.88% | 7.4e-05   |      20 |
     | Text::Table::Any              |    300    |       3   |             35566.44% |                 0.00% | 3.3e-05   |      20 |
     +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+

    The above result formatted in Benchmark.pm style:

                                       Rate  Text::UnicodeBox::Table  Text::ANSITable  Text::Table::More  Text::ASCIITable  Text::Table::TinyColorWide  Text::FormatTable  Text::Table::TinyWide  Text::SimpleTable  Text::Table::Manifold  Text::Table::T...
      Text::UnicodeBox::Table        0.92/s                       --             -49%               -63%              -90%                        -93%               -93%                   -95%               -96%                   -97%               -...
      Text::ANSITable                 1.8/s                      96%               --               -28%              -82%                        -87%               -87%                   -91%               -93%                   -94%               -...
      Text::Table::More               2.5/s                     175%              39%                 --              -75%                        -82%               -82%                   -87%               -90%                   -92%               -...
      Text::ASCIITable                9.6/s                    1000%             459%               300%                --                        -30%               -31%                   -50%               -62%                   -70%               -...
      Text::Table::TinyColorWide       10/s                    1471%             700%               471%               42%                          --                -1%                   -28%               -45%                   -57%               -...
      Text::FormatTable                15/s                    1494%             711%               479%               44%                          1%                 --                   -27%               -44%                   -56%               -...
      Text::Table::TinyWide            20/s                    2100%            1019%               700%              100%                         39%                37%                     --               -24%                   -40%               -...
      Text::SimpleTable                26/s                    2794%            1373%               952%              163%                         84%                81%                    31%                 --                   -21%               -...
      Text::Table::Manifold            30/s                    3566%            1766%              1233%              233%                        133%               129%                    66%                26%                     --                ...
      Text::Table::Tiny                30/s                    3566%            1766%              1233%              233%                        133%               129%                    66%                26%                     0%                ...
      Text::TabularDisplay             40/s                    3566%            1766%              1233%              233%                        133%               129%                    66%                26%                     0%                ...
      Text::Table::HTML                50/s                    5400%            2700%              1900%              400%                        250%               245%                   150%                89%                    50%                ...
      Text::Table::TinyColor           50/s                    5400%            2700%              1900%              400%                        250%               245%                   150%                89%                    50%                ...
      Text::MarkdownTable              60/s                    5400%            2700%              1900%              400%                        250%               245%                   150%                89%                    50%                ...
      Text::Table                      90/s                   10900%            5500%              3900%              900%                        600%               590%                   400%               280%                   200%               2...
      Text::Table::HTML::DataTables   100/s                   10900%            5500%              3900%              900%                        600%               590%                   400%               280%                   200%               2...
      Text::Table::TinyBorderStyle    200/s                   18233%            9233%              6566%             1566%                       1066%              1050%                   733%               533%                   400%               4...
      Text::Table::Org                200/s                   21900%           11100%              7900%             1900%                       1300%              1280%                   900%               660%                   500%               5...
      Text::Table::CSV                200/s                   22348%           11328%              8063%             1940%                       1328%              1308%                   920%               675%                   512%               5...
      Text::Table::Sprintf            300/s                   27400%           13900%              9900%             2400%                       1650%              1625%                  1150%               850%                   650%               6...
      Text::Table::Any                300/s                   36566%           18566%             13233%             3233%                       2233%              2200%                  1566%              1166%                   900%               9...
 
     Legends:
       Text::ANSITable: participant=Text::ANSITable
       Text::ASCIITable: participant=Text::ASCIITable
       Text::FormatTable: participant=Text::FormatTable
       Text::MarkdownTable: participant=Text::MarkdownTable
       Text::SimpleTable: participant=Text::SimpleTable
       Text::Table: participant=Text::Table
       Text::Table::Any: participant=Text::Table::Any
       Text::Table::CSV: participant=Text::Table::CSV
       Text::Table::HTML: participant=Text::Table::HTML
       Text::Table::HTML::DataTables: participant=Text::Table::HTML::DataTables
       Text::Table::Manifold: participant=Text::Table::Manifold
       Text::Table::More: participant=Text::Table::More

README  view on Meta::CPAN

      Text::TabularDisplay            30000/s                    9900%            1900%               966%                          633%                   146%               86%                            80%                    66%          56%      ...
      Text::FormatTable               35700/s                   10614%            2042%              1042%                          685%                   164%              100%                            92%                    78%          67%      ...
      Text::Table::TinyColorWide      45400/s                   13536%            2627%              1354%                          900%                   236%              154%                           145%                   127%         113%      ...
      Text::Table::TinyColor          50000/s                   14900%            2900%              1500%                         1000%                   270%              179%                           169%                   150%         134%      ...
      Text::Table::Tiny               52400/s                   15606%            3041%              1575%                         1051%                   287%              193%                           182%                   161%         145%      ...
      Text::Table::HTML               62200/s                   18533%            3626%              1887%                         1266%                   359%              247%                           235%                   210%         191%      ...
      Text::SimpleTable               64700/s                   19380%            3796%              1977%                         1328%                   380%              263%                           250%                   224%         204%      ...
      Text::Table::Org               145000/s                   43315%            8583%              4530%                         3083%                   970%              710%                           681%                   623%         578%      ...
      Text::Table::Any               191000/s                   57042%           11328%              5995%                         4090%                  1309%              966%                           928%                   852%         793%      ...
      Text::Table::Sprintf           272000/s                   81643%           16248%              8619%                         5894%                  1916%             1425%                          1371%                  1262%        1177%      ...
      Text::Table::CSV               293000/s                   87876%           17495%              9284%                         6351%                  2070%             1542%                          1483%                  1366%        1275%      ...
 
     Legends:
       Text::ANSITable: participant=Text::ANSITable
       Text::ASCIITable: participant=Text::ASCIITable
       Text::FormatTable: participant=Text::FormatTable
       Text::MarkdownTable: participant=Text::MarkdownTable
       Text::SimpleTable: participant=Text::SimpleTable
       Text::Table: participant=Text::Table
       Text::Table::Any: participant=Text::Table::Any
       Text::Table::CSV: participant=Text::Table::CSV
       Text::Table::HTML: participant=Text::Table::HTML
       Text::Table::HTML::DataTables: participant=Text::Table::HTML::DataTables
       Text::Table::Manifold: participant=Text::Table::Manifold
       Text::Table::More: participant=Text::Table::More
       Text::Table::Org: participant=Text::Table::Org
       Text::Table::Sprintf: participant=Text::Table::Sprintf
       Text::Table::Tiny: participant=Text::Table::Tiny
       Text::Table::TinyBorderStyle: participant=Text::Table::TinyBorderStyle
       Text::Table::TinyColor: participant=Text::Table::TinyColor
       Text::Table::TinyColorWide: participant=Text::Table::TinyColorWide
       Text::Table::TinyWide: participant=Text::Table::TinyWide
       Text::TabularDisplay: participant=Text::TabularDisplay
       Text::UnicodeBox::Table: participant=Text::UnicodeBox::Table

    The above result presented as chart:

    Result formatted as table (split, part 5 of 5):

     #table5#
     {dataset=>"wide (30x5)"}
     +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+
     | participant                   | rate (/s) | time (ms) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors   | samples |
     +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+
     | Text::UnicodeBox::Table       |        33 |   30      |                 0.00% |             40107.73% |   0.00028 |      20 |
     | Text::ANSITable               |        70 |   10      |               112.30% |             18838.85% |   0.00034 |      20 |
     | Text::Table::More             |       100 |    9      |               242.25% |             11648.22% |   0.00016 |      20 |
     | Text::ASCIITable              |       450 |    2.2    |              1269.60% |              2835.73% | 1.8e-05   |      21 |
     | Text::FormatTable             |       650 |    1.5    |              1867.35% |              1943.75% | 1.2e-05   |      20 |
     | Text::Table::TinyColorWide    |       830 |    1.2    |              2401.71% |              1507.21% | 3.5e-06   |      20 |
     | Text::Table::TinyBorderStyle  |       900 |    1      |              2611.90% |              1382.64% | 1.7e-05   |      20 |
     | Text::Table                   |      1200 |    0.87   |              3377.43% |              1056.25% | 1.5e-06   |      20 |
     | Text::Table::Tiny             |      1000 |    0.8    |              3482.31% |              1022.40% | 3.8e-05   |      29 |
     | Text::Table::TinyWide         |      1200 |    0.83   |              3524.20% |              1009.42% |   1e-06   |      20 |
     | Text::SimpleTable             |      1580 |    0.633  |              4667.39% |               743.39% | 5.8e-07   |      21 |
     | Text::Table::Manifold         |      1700 |    0.6    |              4936.57% |               698.32% | 7.9e-07   |      20 |
     | Text::TabularDisplay          |      2300 |    0.44   |              6812.25% |               481.69% | 7.1e-07   |      20 |
     | Text::Table::TinyColor        |      2900 |    0.35   |              8603.40% |               361.98% |   5e-07   |      20 |
     | Text::Table::HTML             |      3370 |    0.297  |             10075.60% |               295.14% | 1.7e-07   |      20 |
     | Text::MarkdownTable           |      3400 |    0.3    |             10085.88% |               294.74% | 3.2e-07   |      20 |
     | Text::Table::HTML::DataTables |      4100 |    0.24   |             12334.13% |               223.37% | 7.8e-07   |      20 |
     | Text::Table::Sprintf          |      5260 |    0.19   |             15772.29% |               153.32% | 5.1e-08   |      21 |
     | Text::Table::Org              |      7800 |    0.13   |             23583.00% |                69.77% | 2.8e-07   |      20 |
     | Text::Table::CSV              |     11000 |    0.088  |             34210.03% |                17.19% | 1.6e-07   |      20 |
     | Text::Table::Any              |     13300 |    0.0751 |             40107.73% |                 0.00% | 4.5e-08   |      20 |
     +-------------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+

    The above result formatted in Benchmark.pm style:

                                        Rate  Text::UnicodeBox::Table  Text::ANSITable  Text::Table::More  Text::ASCIITable  Text::FormatTable  Text::Table::TinyColorWide  Text::Table::TinyBorderStyle  Text::Table  Text::Table::TinyWide  Text::Table:...
      Text::UnicodeBox::Table           33/s                       --             -66%               -70%              -92%               -95%                        -96%                          -96%         -97%                   -97%              ...
      Text::ANSITable                   70/s                     200%               --                -9%              -78%               -85%                        -88%                          -90%         -91%                   -91%              ...
      Text::Table::More                100/s                     233%              11%                 --              -75%               -83%                        -86%                          -88%         -90%                   -90%              ...
      Text::ASCIITable                 450/s                    1263%             354%               309%                --               -31%                        -45%                          -54%         -60%                   -62%              ...
      Text::FormatTable                650/s                    1900%             566%               500%               46%                 --                        -20%                          -33%         -42%                   -44%              ...
      Text::Table::TinyColorWide       830/s                    2400%             733%               650%               83%                25%                          --                          -16%         -27%                   -30%              ...
      Text::Table::TinyBorderStyle     900/s                    2900%             900%               800%              120%                50%                         19%                            --         -13%                   -17%              ...
      Text::Table                     1200/s                    3348%            1049%               934%              152%                72%                         37%                           14%           --                    -4%              ...
      Text::Table::TinyWide           1200/s                    3514%            1104%               984%              165%                80%                         44%                           20%           4%                     --              ...
      Text::Table::Tiny               1000/s                    3650%            1150%              1025%              175%                87%                         49%                           25%           8%                     3%              ...
      Text::SimpleTable               1580/s                    4639%            1479%              1321%              247%               136%                         89%                           57%          37%                    31%              ...
      Text::Table::Manifold           1700/s                    4900%            1566%              1400%              266%               150%                        100%                           66%          44%                    38%              ...
      Text::TabularDisplay            2300/s                    6718%            2172%              1945%              400%               240%                        172%                          127%          97%                    88%              ...
      Text::Table::TinyColor          2900/s                    8471%            2757%              2471%              528%               328%                        242%                          185%         148%                   137%              ...
      Text::MarkdownTable             3400/s                    9900%            3233%              2900%              633%               400%                        300%                          233%         190%                   176%              ...
      Text::Table::HTML               3370/s                   10001%            3267%              2930%              640%               405%                        304%                          236%         192%                   179%              ...
      Text::Table::HTML::DataTables   4100/s                   12400%            4066%              3650%              816%               525%                        400%                          316%         262%                   245%              ...
      Text::Table::Sprintf            5260/s                   15689%            5163%              4636%             1057%               689%                        531%                          426%         357%                   336%              ...
      Text::Table::Org                7800/s                   22976%            7592%              6823%             1592%              1053%                        823%                          669%         569%                   538%              ...
      Text::Table::CSV               11000/s                   33990%           11263%             10127%             2400%              1604%                       1263%                         1036%         888%                   843%              ...
      Text::Table::Any               13300/s                   39846%           13215%             11884%             2829%              1897%                       1497%                         1231%        1058%                  1005%              ...
 
     Legends:
       Text::ANSITable: participant=Text::ANSITable
       Text::ASCIITable: participant=Text::ASCIITable
       Text::FormatTable: participant=Text::FormatTable
       Text::MarkdownTable: participant=Text::MarkdownTable
       Text::SimpleTable: participant=Text::SimpleTable
       Text::Table: participant=Text::Table
       Text::Table::Any: participant=Text::Table::Any
       Text::Table::CSV: participant=Text::Table::CSV
       Text::Table::HTML: participant=Text::Table::HTML
       Text::Table::HTML::DataTables: participant=Text::Table::HTML::DataTables
       Text::Table::Manifold: participant=Text::Table::Manifold
       Text::Table::More: participant=Text::Table::More
       Text::Table::Org: participant=Text::Table::Org
       Text::Table::Sprintf: participant=Text::Table::Sprintf
       Text::Table::Tiny: participant=Text::Table::Tiny
       Text::Table::TinyBorderStyle: participant=Text::Table::TinyBorderStyle
       Text::Table::TinyColor: participant=Text::Table::TinyColor
       Text::Table::TinyColorWide: participant=Text::Table::TinyColorWide
       Text::Table::TinyWide: participant=Text::Table::TinyWide
       Text::TabularDisplay: participant=Text::TabularDisplay
       Text::UnicodeBox::Table: participant=Text::UnicodeBox::Table

    The above result presented as chart:

  Sample benchmark #2
    Benchmark command (benchmarking module startup overhead):

     % bencher --cpanmodules-module TextTable --module-startup



( run in 1.057 second using v1.01-cache-2.11-cpan-39bf76dae61 )