#!perl

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

use 5.010001;
use strict;
use warnings;
use experimental 'smartmatch';

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

my $contestants = \%App::BenchSerializers::contestants;

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

        map {
            $_ => [$^X, "-e", "use $_"],
        } grep {'json' ~~ @{$contestants->{$_}{tags}//[]}}
        sort keys %$contestants,
    },
);

# ABSTRACT: Benchmark startup time of Perl YAML modules
# PODNAME: bench-startup-yaml-modules

__END__

=pod

=encoding UTF-8

=head1 NAME

bench-startup-yaml-modules - Benchmark startup time of Perl YAML modules

=head1 VERSION

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

=head1 SYNOPSIS

 % bench-startup-yaml-modules

Sample output:

                                 Rate JSON::Decode::Marpa      JSON::PP   Pegex::JSON JSON::MaybeXS     JSON::XS JSON::Decode::Regexp   none
 JSON::Decode::Marpa  13.013+-0.014/s                  --        -84.3%        -86.7%        -90.2%       -93.8%               -96.2% -98.5%
 JSON::PP             82.852+-0.063/s       536.69+-0.86%            --        -15.6%        -37.6%       -60.4%               -75.6% -90.8%
 Pegex::JSON            98.17+-0.14/s         654.4+-1.4%  18.49+-0.19%            --        -26.1%       -53.0%               -71.1% -89.1%
 JSON::MaybeXS         132.84+-0.11/s         920.8+-1.4%  60.34+-0.18%  35.32+-0.22%            --       -36.4%               -60.9% -85.2%
 JSON::XS              209.02+-0.12/s          1506.2+-2% 152.28+-0.24% 112.91+-0.33%  57.34+-0.16%           --               -38.5% -76.7%
 JSON::Decode::Regexp  339.71+-0.57/s        2510.6+-5.3% 310.02+-0.76% 246.05+-0.76% 155.73+-0.48% 62.53+-0.29%                   -- -62.1%
 none                    897.4+-3.3/s           6796+-26%     983.2+-4%   814.2+-3.6%   575.6+-2.5%  329.4+-1.6%          164.2+-1.1%     --
 
 Average times:
   none                :     1.1143ms
   JSON::Decode::Regexp:     2.9437ms
   JSON::XS            :     4.7842ms
   JSON::MaybeXS       :     7.5279ms
   Pegex::JSON         :    10.1864ms
   JSON::PP            :    12.0697ms
   JSON::Decode::Marpa :    76.8462ms

=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
