#!perl

our $DATE = '2015-06-29'; # DATE
our $VERSION = '0.01'; # VERSION

use 5.010001;
use strict;
use warnings;

use App::BenchSerializers;
use Benchmark::Command;

Benchmark::Command::run(
    undef,
    {
        'none'                => [$^X, "-e1"],

        map {
            $_ => [$^X, "-e", "use $_"],
        } sort keys %App::BenchSerializers::contestants,
    },
);

# ABSTRACT: Benchmark startup time of Perl data serialization modules
# PODNAME: bench-startup-serializers

__END__

=pod

=encoding UTF-8

=head1 NAME

bench-startup-serializers - Benchmark startup time of Perl data serialization modules

=head1 VERSION

This document describes version 0.01 of bench-startup-serializers (from Perl distribution App-BenchSerializers), released on 2015-06-29.

=head1 SYNOPSIS

 % bench-startup-serializers

Sample output:

                                 Rate JSON::Decode::Marpa      YAML::XS      JSON::PP  Pegex::JSON JSON::MaybeXS      Storable        Sereal     YAML::Old     JSON::XS   YAML::Syck Data::MessagePack JSON::Decode::Regexp   none
 JSON::Decode::Marpa  13.037+-0.015/s                  --        -63.1%        -84.1%       -86.3%        -90.2%        -91.5%        -92.2%        -92.3%       -93.6%       -94.1%            -96.2%               -96.2% -98.5%
 YAML::XS             35.307+-0.026/s       170.82+-0.37%            --        -57.1%       -62.9%        -73.5%        -76.9%        -78.8%        -79.2%       -82.6%       -84.1%            -89.6%               -89.7% -96.1%
 JSON::PP                82.23+-0.1/s         530.7+-1.1% 132.89+-0.33%            --       -13.6%        -38.3%        -46.3%        -50.7%        -51.6%       -59.4%       -63.1%            -75.8%               -76.0% -90.8%
 Pegex::JSON            95.12+-0.48/s         629.6+-3.8%   169.4+-1.4%  15.67+-0.61%           --        -28.6%        -37.9%        -43.0%        -44.0%       -53.1%       -57.3%            -72.0%               -72.2% -89.4%
 JSON::MaybeXS        133.245+-0.08/s           922+-1.3% 277.38+-0.36%  62.05+-0.22% 40.09+-0.72%            --        -13.0%        -20.2%        -21.6%       -34.3%       -40.1%            -60.8%               -61.1% -85.1%
 Storable              153.14+-0.14/s        1074.6+-1.7% 333.72+-0.51%  86.24+-0.29%    61+-0.83%  14.93+-0.13%            --         -8.2%         -9.9%       -24.5%       -31.2%            -54.9%               -55.3% -82.9%
 Sereal                166.88+-0.16/s          1180+-1.9% 372.64+-0.58% 102.95+-0.32% 75.45+-0.91%  25.24+-0.14%   8.97+-0.15%            --         -1.8%       -17.7%       -25.0%            -50.8%               -51.3% -81.4%
 YAML::Old             169.91+-0.21/s        1203.2+-2.2% 381.22+-0.69% 106.63+-0.36% 78.63+-0.93%  27.51+-0.17%  10.95+-0.17%   1.81+-0.16%            --       -16.2%       -23.7%            -50.0%               -50.4% -81.1%
 JSON::XS               202.71+-0.6/s        1454.9+-4.9%   474.1+-1.7% 146.53+-0.79%  113.1+-1.3%  52.14+-0.46%  32.37+-0.41%  21.47+-0.38%  19.31+-0.38%           --        -8.9%            -40.3%               -40.8% -77.4%
 YAML::Syck            222.61+-0.23/s        1607.5+-2.6%   530.5+-0.8% 170.73+-0.44%    134+-1.2%   67.07+-0.2%   45.37+-0.2%   33.4+-0.19%  31.02+-0.21%  9.82+-0.34%           --            -34.4%               -35.0% -75.2%
 Data::MessagePack     339.49+-0.44/s          2504+-4.5%   861.5+-1.4% 312.87+-0.73%  256.9+-1.9% 154.79+-0.36% 121.69+-0.35% 103.44+-0.33%  99.81+-0.36% 67.47+-0.54%  52.5+-0.25%                --                -0.9% -62.1%
 JSON::Decode::Regexp  342.56+-0.71/s        2527.6+-6.2%   870.2+-2.1%     316.6+-1%    260.2+-2% 157.09+-0.55%  123.7+-0.51% 105.28+-0.47% 101.62+-0.48% 68.99+-0.61% 53.88+-0.36%        0.9+-0.25%                   -- -61.8%
 none                    896.9+-2.7/s           6780+-22%  2440.3+-7.9%   990.8+-3.6%    843+-5.6%   573.1+-2.1%   485.7+-1.8%   437.5+-1.7%   427.9+-1.7%  342.5+-1.9%  302.9+-1.3%     164.19+-0.87%        161.83+-0.96%     --
 
 Average times:
   none                :     1.1150ms
   JSON::Decode::Regexp:     2.9192ms
   Data::MessagePack   :     2.9456ms
   YAML::Syck          :     4.4922ms
   JSON::XS            :     4.9332ms
   YAML::Old           :     5.8855ms
   Sereal              :     5.9923ms
   Storable            :     6.5300ms
   JSON::MaybeXS       :     7.5050ms
   Pegex::JSON         :    10.5130ms
   JSON::PP            :    12.1610ms
   YAML::XS            :    28.3230ms
   JSON::Decode::Marpa :    76.7048ms

=head1 SEE ALSO

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-BenchSerializers>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-App-BenchSerializers>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-BenchSerializers>

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.

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2015 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.

=cut
