Bencher-Scenario-GraphConnectedComponentsModules

 view release on metacpan or  search on metacpan

lib/Bencher/Scenario/GraphConnectedComponentsModules.pm  view on Meta::CPAN

     }
 }
 @allgraphs;




=back

=head1 BENCHMARK DATASETS

=over

=item * empty

=item * 2nodes-1edge

=item * 6nodes-5edges-2subgraphs

=item * 100nodes-500edges-1subgraph

=back

=head1 BENCHMARK SAMPLE RESULTS

=head2 Sample benchmark #1

Run on: perl: I<< v5.38.2 >>, CPU: I<< Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (2 cores) >>, OS: I<< GNU/Linux Ubuntu version 20.04 >>, OS kernel: I<< Linux version 5.4.0-164-generic >>.

Benchmark command (default options):

 % bencher -m GraphConnectedComponentsModules

Result formatted as table:

 #table1#
 +-----------------------------------------+-----------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+
 | participant                             | dataset                     | rate (/s) | time (ms) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors   | samples |
 +-----------------------------------------+-----------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+
 | Graph::connected_components             | 100nodes-500edges-1subgraph |        50 | 20        |                 0.00% |           3896155.63% |   0.00035 |      20 |
 | Data::Graph::Util::connected_components | 100nodes-500edges-1subgraph |      1720 |  0.582    |              3227.10% |            117006.73% | 3.1e-07   |      20 |
 | Graph::connected_components             | 6nodes-5edges-2subgraphs    |      1800 |  0.54     |              3460.98% |            109315.22% | 6.5e-07   |      20 |
 | Graph::connected_components             | 2nodes-1edge                |      4300 |  0.23     |              8302.04% |             46272.75% | 5.1e-07   |      20 |
 | Graph::connected_components             | empty                       |     37000 |  0.027    |             71599.02% |              5334.18% | 1.3e-07   |      20 |
 | Data::Graph::Util::connected_components | 6nodes-5edges-2subgraphs    |     93300 |  0.0107   |            180620.43% |              2055.96% |   6e-09   |      20 |
 | Data::Graph::Util::connected_components | 2nodes-1edge                |    294000 |  0.00341  |            568670.49% |               585.03% | 1.9e-09   |      20 |
 | Data::Graph::Util::connected_components | empty                       |   2010000 |  0.000497 |           3896155.63% |                 0.00% |   2e-10   |      20 |
 +-----------------------------------------+-----------------------------+-----------+-----------+-----------------------+-----------------------+-----------+---------+


The above result formatted in L<Benchmark.pm|Benchmark> style:

                                            Rate  G:c_c 100nodes-500edges-1subgraph  DGU:c_c 100nodes-500edges-1subgraph  G:c_c 6nodes-5edges-2subgraphs  G:c_c 2nodes-1edge  G:c_c empty  DGU:c_c 6nodes-5edges-2subgraphs  DGU:c_c 2nodes-1edge  DGU:c_c...
  G:c_c 100nodes-500edges-1subgraph         50/s                                 --                                 -97%                            -97%                -98%         -99%                              -99%                  -99%         ...
  DGU:c_c 100nodes-500edges-1subgraph     1720/s                              3336%                                   --                             -7%                -60%         -95%                              -98%                  -99%         ...
  G:c_c 6nodes-5edges-2subgraphs          1800/s                              3603%                                   7%                              --                -57%         -95%                              -98%                  -99%         ...
  G:c_c 2nodes-1edge                      4300/s                              8595%                                 153%                            134%                  --         -88%                              -95%                  -98%         ...
  G:c_c empty                            37000/s                             73974%                                2055%                           1900%                751%           --                              -60%                  -87%         ...
  DGU:c_c 6nodes-5edges-2subgraphs       93300/s                            186815%                                5339%                           4946%               2049%         152%                                --                  -68%         ...
  DGU:c_c 2nodes-1edge                  294000/s                            586410%                               16967%                          15735%               6644%         691%                              213%                    --         ...
  DGU:c_c empty                        2010000/s                           4024044%                              117002%                         108551%              46177%        5332%                             2052%                  586%         ...
 
 Legends:
   DGU:c_c 100nodes-500edges-1subgraph: dataset=100nodes-500edges-1subgraph participant=Data::Graph::Util::connected_components
   DGU:c_c 2nodes-1edge: dataset=2nodes-1edge participant=Data::Graph::Util::connected_components
   DGU:c_c 6nodes-5edges-2subgraphs: dataset=6nodes-5edges-2subgraphs participant=Data::Graph::Util::connected_components
   DGU:c_c empty: dataset=empty participant=Data::Graph::Util::connected_components
   G:c_c 100nodes-500edges-1subgraph: dataset=100nodes-500edges-1subgraph participant=Graph::connected_components
   G:c_c 2nodes-1edge: dataset=2nodes-1edge participant=Graph::connected_components
   G:c_c 6nodes-5edges-2subgraphs: dataset=6nodes-5edges-2subgraphs participant=Graph::connected_components
   G:c_c empty: dataset=empty participant=Graph::connected_components

=head2 Sample benchmark #2

Benchmark command (benchmarking module startup overhead):

 % bencher -m GraphConnectedComponentsModules --module-startup

Result formatted as table:

 #table2#
 +---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
 | participant         | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |
 +---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
 | Graph               |        30 |                23 |                 0.00% |               330.30% | 0.00042 |      20 |
 | Data::Graph::Util   |        10 |                 3 |               183.50% |                51.78% | 0.00013 |      20 |
 | perl -e1 (baseline) |         7 |                 0 |               330.30% |                 0.00% | 0.00017 |      20 |
 +---------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+


The above result formatted in L<Benchmark.pm|Benchmark> style:

                          Rate     G  DG:U  perl -e1 (baseline) 
  G                     33.3/s    --  -66%                 -76% 
  DG:U                 100.0/s  200%    --                 -30% 
  perl -e1 (baseline)  142.9/s  328%   42%                   -- 
 
 Legends:
   DG:U: mod_overhead_time=3 participant=Data::Graph::Util
   G: mod_overhead_time=23 participant=Graph
   perl -e1 (baseline): mod_overhead_time=0 participant=perl -e1 (baseline)

To display as an interactive HTML table on a browser, you can add option C<--format html+datatables>.

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Bencher-Scenario-GraphConnectedComponentsModules>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-Bencher-Scenario-GraphConnectedComponentsModules>.

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 CONTRIBUTING


To contribute, you can send patches by email/via RT, or send pull requests on
GitHub.



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