NAME
    Bencher::Scenario::crypt - Benchmark various algorithms of crypt()

VERSION
    This document describes version 0.020 of Bencher::Scenario::crypt (from
    Perl distribution Bencher-Scenario-crypt), released on 2021-07-24.

SYNOPSIS
    To run benchmark with default option:

     % bencher -m crypt

    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.

BENCHMARK PARTICIPANTS
    *   crypt (perl_code)

        Code template:

         state $i = 0; my $c = crypt(++$i, <salt>); die "crypt fails/unsupported" unless $c; $c

BENCHMARK DATASETS
    *   des

    *   md5-crypt

    *   bcrypt-8

    *   bcrypt-10

    *   bcrypt-12

    *   bcrypt-14

    *   ssha256-5k

    *   ssha256-50k

    *   ssha256-500k

    *   ssha512-5k

    *   ssha512-50k

    *   ssha512-500k

SAMPLE BENCHMARK RESULTS
    Run on: perl: *v5.30.2*, CPU: *Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
    (4 cores)*, OS: *GNU/Linux LinuxMint version 19*, OS kernel: *Linux
    version 5.3.0-68-generic*.

    Benchmark with default options ("bencher -m crypt"):

     #table1#
     +--------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
     | dataset      | rate (/s) | time (ms) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |
     +--------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
     | ssha512-500k |      4.98 |  201      |                 0.00% |           7096982.72% | 5.2e-05 |      20 |
     | ssha256-500k |      6.49 |  154      |                30.25% |           5448770.36% | 4.5e-05 |      20 |
     | ssha512-50k  |     49.9  |   20      |               901.89% |            708270.75% | 6.2e-06 |      20 |
     | ssha256-50k  |     64.9  |   15.4    |              1202.92% |            544607.52% | 5.1e-06 |      20 |
     | ssha512-5k   |    496    |    2.01   |              9859.12% |             71162.17% | 6.9e-07 |      20 |
     | ssha256-5k   |    645    |    1.55   |             12835.62% |             54764.65% | 1.3e-06 |      21 |
     | md5-crypt    |   8970    |    0.111  |            179853.46% |              3843.84% | 5.3e-08 |      20 |
     | des          | 350000    |    0.0028 |           7096982.72% |                 0.00% | 3.6e-09 |      27 |
     +--------------+-----------+-----------+-----------------------+-----------------------+---------+---------+

    Formatted as Benchmark.pm result:

                        Rate  ssha512-500k  ssha256-500k  ssha512-50k  ssha256-50k  ssha512-5k  ssha256-5k  md5-crypt   des 
      ssha512-500k    4.98/s            --          -23%         -90%         -92%        -99%        -99%       -99%  -99% 
      ssha256-500k    6.49/s           30%            --         -87%         -90%        -98%        -98%       -99%  -99% 
      ssha512-50k     49.9/s          905%          670%           --         -23%        -89%        -92%       -99%  -99% 
      ssha256-50k     64.9/s         1205%          900%          29%           --        -86%        -89%       -99%  -99% 
      ssha512-5k       496/s         9900%         7561%         895%         666%          --        -22%       -94%  -99% 
      ssha256-5k       645/s        12867%         9835%        1190%         893%         29%          --       -92%  -99% 
      md5-crypt       8970/s       180981%       138638%       17918%       13773%       1710%       1296%         --  -97% 
      des           350000/s      7178471%      5499900%      714185%      549900%      71685%      55257%      3864%    -- 
 
     Legends:
       des: dataset=des
       md5-crypt: dataset=md5-crypt
       ssha256-500k: dataset=ssha256-500k
       ssha256-50k: dataset=ssha256-50k
       ssha256-5k: dataset=ssha256-5k
       ssha512-500k: dataset=ssha512-500k
       ssha512-50k: dataset=ssha512-50k
       ssha512-5k: dataset=ssha512-5k

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

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

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

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

