Bencher-Scenario-Serializers

 view release on metacpan or  search on metacpan

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

            module => 'Data::MessagePack',
            function => 'pack',
            code_template => 'state $obj = Data::MessagePack->new; $obj->pack(<data>)',
        },
        {
            name => 'Data::MessagePack::unpack',
            tags => ['binary', 'msgpack', 'deserialize'],
            module => 'Data::MessagePack',
            function => 'unpack',
            code_template => 'state $obj = Data::MessagePack->new; $obj->unpack(<data>)',
        },

        {
            name => 'eval()',
            tags => ['perl', 'deserialize'],
            code_template => 'eval(<data>)',
        },
        {
            name => 'Data::Undump',
            tags => ['perl', 'deserialize'],
            fcall_template => 'Data::Undump::undump(<data>)',
        },
        {
            name => 'Data::Undump::PPI',
            tags => ['perl', 'deserialize'],
            fcall_template => 'Data::Undump::PPI::Undump(<data>)',
        },

    ],

    # XXX: add more datasets (larger data, etc)
    datasets => [
        {
            name => 'undef',
            summary => 'undef',
            args => {data=>undef},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],
            exclude_participant_tags => ['cant_handle_scalar'],
        },
        {
            name => 'num',
            summary => 'A single number (-1.23)',
            args => {data=>-1.23},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],
            exclude_participant_tags => ['cant_handle_scalar'],
        },
        {
            name => 'str1k',
            summary => 'A non-Unicode string 1024 characters/bytes long',
            args => {data=>'a' x 1024},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],
            exclude_participant_tags => ['cant_handle_scalar'],
        },
        {
            name => 'str1k',
            summary => 'A Unicode string 1024 characters (3072-bytes) long',
            args => {data=>'我爱你爱你一辈子' x 128},
            tags => ['serialize', 'unicode'],
            include_participant_tags => ['serialize'],
            exclude_participant_tags => ['cant_handle_scalar'],
        },

        {
            name => 'array_int_10',
            summary => 'A 10-element array containing ints',
            args => {data=>[1..10]},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],
        },
        {
            name => 'array_int_100',
            summary => 'A 100-element array containing ints',
            args => {data=>[1..100]},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],
        },
        {
            name => 'array_int_1000',
            summary => 'A 1000-element array containing ints',
            args => {data=>[1..1000]},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],
        },
        {
            name => 'array_str1k_10',
            summary => 'A 10-element array containing 1024-characters/bytes-long non-Unicode strings',
            args => {data=>[('a' x 1024) x 10]},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],
        },
        {
            name => 'array_ustr1k_10',
            summary => 'A 10-element array containing 1024-characters-long (3072-bytes long) Unicode strings',
            args => {data=>[('我爱你爱你一辈子' x 128) x 10]},
            tags => ['serialize', 'json'],
            include_participant_tags => ['serialize'],
        },

        {
            name => 'hash_int_10',
            summary => 'A 10-key hash {1=>0, ..., 10=>0}',
            args => {data=>{map {$_=>0} 1..10}},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],
        },
        {
            name => 'hash_int_100',
            summary => 'A 100-key hash {1=>0, ..., 100=>0}',
            args => {data=>{map {$_=>0} 1..100}},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],
        },
        {
            name => 'hash_int_1000',
            summary => 'A 1000-key hash {1=>0, ..., 1000=>0}',
            args => {data=>{map {$_=>0} 1..1000}},
            tags => ['serialize'],
            include_participant_tags => ['serialize'],

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



=item * Data::MessagePack::pack (perl_code) [binary, msgpack, serialize]

Code template:

 state $obj = Data::MessagePack->new; $obj->pack(<data>)



=item * Data::MessagePack::unpack (perl_code) [binary, msgpack, deserialize]

Code template:

 state $obj = Data::MessagePack->new; $obj->unpack(<data>)



=item * eval() (perl_code) [perl, deserialize]

Code template:

 eval(<data>)



=item * Data::Undump (perl_code) [perl, deserialize]

Function call template:

 Data::Undump::undump(<data>)



=item * Data::Undump::PPI (perl_code) [perl, deserialize]

Function call template:

 Data::Undump::PPI::Undump(<data>)



=back

=head1 BENCHMARK DATASETS

=over

=item * undef [serialize]

undef.

=item * num [serialize]

A single number (-1.23).

=item * str1k [serialize]

A non-Unicode string 1024 charactersE<sol>bytes long.

=item * str1k [serialize, unicode]

A Unicode string 1024 characters (3072-bytes) long.

=item * array_int_10 [serialize]

A 10-element array containing ints.

=item * array_int_100 [serialize]

A 100-element array containing ints.

=item * array_int_1000 [serialize]

A 1000-element array containing ints.

=item * array_str1k_10 [serialize]

A 10-element array containing 1024-charactersE<sol>bytes-long non-Unicode strings.

=item * array_ustr1k_10 [serialize, json]

A 10-element array containing 1024-characters-long (3072-bytes long) Unicode strings.

=item * hash_int_10 [serialize]

A 10-key hash {1=E<gt>0, ..., 10=E<gt>0}.

=item * hash_int_100 [serialize]

A 100-key hash {1=E<gt>0, ..., 100=E<gt>0}.

=item * hash_int_1000 [serialize]

A 1000-key hash {1=E<gt>0, ..., 1000=E<gt>0}.

=item * json:null [deserialize]

null.

=item * json:num [deserialize]

A single number (-1.23).

=item * json:str1k [deserialize]

A non-Unicode (ASCII) string 1024-charactersE<sol>bytes long.

=item * json:array_int_10 [deserialize]

A 10-element array containing ints.

=item * json:array_int_100 [deserialize]

A 10-element array containing ints.

=item * json:array_int_1000 [deserialize]

A 1000-element array containing ints.

=item * json:array_str1k_10 [deserialize]

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

   YS:D yaml, serialize: p_tags=yaml, serialize participant=YAML::Syck::Dump
   YX:D yaml, serialize: p_tags=yaml, serialize participant=YAML::XS::Dump

 #table9#
 {dataset=>"num"}
 +--------------------------------+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | participant                    | p_tags                     | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |
 +--------------------------------+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | YAML::Old::Dump                | yaml, serialize            |     20000 |   51      |                 0.00% |             24465.64% | 1.7e-07 |      20 |
 | YAML::Dump                     | yaml, serialize            |     20000 |   50      |                 1.91% |             24006.26% |   2e-07 |      20 |
 | MarpaX::ESLIF::ECMA404::encode | json, serialize            |    100000 |   10      |               404.45% |              4769.83% | 1.9e-07 |      21 |
 | YAML::Syck::Dump               | yaml, serialize            |    200000 |    5      |               894.97% |              2369.00% |   7e-08 |      20 |
 | JSON::Tiny::encode_json        | json, serialize            |    240000 |    4.2    |              1124.80% |              1905.68% | 6.7e-09 |      20 |
 | JSON::PP::encode_json          | json, serialize            |    270000 |    3.7    |              1277.26% |              1683.67% | 6.7e-09 |      20 |
 | YAML::XS::Dump                 | yaml, serialize            |    339000 |    2.95   |              1621.21% |              1327.23% | 8.3e-10 |      20 |
 | Cpanel::JSON::XS::encode_json  | json, serialize            |   1800000 |    0.57   |              8845.91% |               174.60% | 1.4e-09 |      29 |
 | JSON::MaybeXS::encode_json     | json, serialize            |   1840000 |    0.543  |              9267.82% |               162.23% | 2.1e-10 |      20 |
 | JSON::XS::encode_json          | json, serialize            |   1967000 |    0.5084 |              9900.67% |               145.64% | 2.2e-11 |      20 |
 | JSON::Create::create_json      | json, serialize            |   2200000 |    0.46   |             11049.43% |               120.33% | 4.4e-09 |      20 |
 | Sereal::encode_sereal          | binary, sereal, serialize  |   3400000 |    0.294  |             17168.15% |                42.26% | 1.1e-10 |      20 |
 | Data::MessagePack::pack        | binary, msgpack, serialize |   4830000 |    0.207  |             24465.64% |                 0.00% |   1e-10 |      21 |
 +--------------------------------+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+

Formatted as L<Benchmark.pm|Benchmark> result:

                                        Rate  YO:D yaml, serialize  Y:D yaml, serialize  MEE:e json, serialize  YS:D yaml, serialize  JT:e_j json, serialize  JP:e_j json, serialize  YX:D yaml, serialize  CJX:e_j json, serialize  JM:e_j json, serializ...
  YO:D yaml, serialize               20000/s                    --                  -1%                   -80%                  -90%                    -91%                    -92%                  -94%                     -98%                    -98...
  Y:D yaml, serialize                20000/s                    2%                   --                   -80%                  -90%                    -91%                    -92%                  -94%                     -98%                    -98...
  MEE:e json, serialize             100000/s                  409%                 400%                     --                  -50%                    -57%                    -63%                  -70%                     -94%                    -94...
  YS:D yaml, serialize              200000/s                  919%                 900%                   100%                    --                    -15%                    -26%                  -40%                     -88%                    -89...
  JT:e_j json, serialize            240000/s                 1114%                1090%                   138%                   19%                      --                    -11%                  -29%                     -86%                    -87...
  JP:e_j json, serialize            270000/s                 1278%                1251%                   170%                   35%                     13%                      --                  -20%                     -84%                    -85...
  YX:D yaml, serialize              339000/s                 1628%                1594%                   238%                   69%                     42%                     25%                    --                     -80%                    -81...
  CJX:e_j json, serialize          1800000/s                 8847%                8671%                  1654%                  777%                    636%                    549%                  417%                       --                     -4...
  JM:e_j json, serialize           1840000/s                 9292%                9108%                  1741%                  820%                    673%                    581%                  443%                       4%                      -...
  JX:e_j json, serialize           1967000/s                 9931%                9734%                  1866%                  883%                    726%                    627%                  480%                      12%                      6...
  JC:c_j json, serialize           2200000/s                10986%               10769%                  2073%                  986%                    813%                    704%                  541%                      23%                     18...
  S:e_s binary, sereal, serialize  3400000/s                17246%               16906%                  3301%                 1600%                   1328%                   1158%                  903%                      93%                     84...
  DM:p binary, msgpack, serialize  4830000/s                24537%               24054%                  4730%                 2315%                   1928%                   1687%                 1325%                     175%                    162...
 
 Legends:
   CJX:e_j json, serialize: p_tags=json, serialize participant=Cpanel::JSON::XS::encode_json
   DM:p binary, msgpack, serialize: p_tags=binary, msgpack, serialize participant=Data::MessagePack::pack
   JC:c_j json, serialize: p_tags=json, serialize participant=JSON::Create::create_json
   JM:e_j json, serialize: p_tags=json, serialize participant=JSON::MaybeXS::encode_json
   JP:e_j json, serialize: p_tags=json, serialize participant=JSON::PP::encode_json
   JT:e_j json, serialize: p_tags=json, serialize participant=JSON::Tiny::encode_json
   JX:e_j json, serialize: p_tags=json, serialize participant=JSON::XS::encode_json
   MEE:e json, serialize: p_tags=json, serialize participant=MarpaX::ESLIF::ECMA404::encode
   S:e_s binary, sereal, serialize: p_tags=binary, sereal, serialize participant=Sereal::encode_sereal
   Y:D yaml, serialize: p_tags=yaml, serialize participant=YAML::Dump
   YO:D yaml, serialize: p_tags=yaml, serialize participant=YAML::Old::Dump
   YS:D yaml, serialize: p_tags=yaml, serialize participant=YAML::Syck::Dump
   YX:D yaml, serialize: p_tags=yaml, serialize participant=YAML::XS::Dump

 #table10#
 {dataset=>"str1k"}
 +--------------------------------+--------------------+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | participant                    | ds_tags            | p_tags                     | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |
 +--------------------------------+--------------------+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | MarpaX::ESLIF::ECMA404::encode | serialize, unicode | json, serialize            |      5000 |   200     |                 0.00% |             74352.92% | 1.6e-06 |      21 |
 | MarpaX::ESLIF::ECMA404::encode | serialize          | json, serialize            |      9300 |   110     |                86.76% |             39765.85% | 9.1e-07 |      20 |
 | YAML::Old::Dump                | serialize, unicode | yaml, serialize            |     10000 |    97     |               107.20% |             35832.18% | 3.5e-07 |      20 |
 | YAML::Dump                     | serialize, unicode | yaml, serialize            |     10000 |    96     |               107.54% |             35774.49% | 2.4e-07 |      20 |
 | YAML::Dump                     | serialize          | yaml, serialize            |     17000 |    58     |               242.47% |             21640.13% | 1.3e-07 |      22 |
 | YAML::Old::Dump                | serialize          | yaml, serialize            |     18000 |    57     |               254.11% |             20925.62% | 9.9e-08 |      23 |
 | JSON::PP::encode_json          | serialize, unicode | json, serialize            |     25200 |    39.6   |               405.51% |             14628.21% | 1.2e-08 |      24 |
 | JSON::Tiny::encode_json        | serialize, unicode | json, serialize            |     28000 |    36     |               461.07% |             13169.74% | 6.7e-08 |      20 |
 | YAML::XS::Dump                 | serialize, unicode | yaml, serialize            |     45000 |    22     |               793.86% |              8229.34% | 2.7e-08 |      20 |
 | JSON::MaybeXS::encode_json     | serialize, unicode | json, serialize            |     49000 |    21     |               872.02% |              7559.58% | 1.1e-07 |      20 |
 | Cpanel::JSON::XS::encode_json  | serialize, unicode | json, serialize            |     52000 |    19     |               950.18% |              6989.53% | 3.2e-08 |      22 |
 | JSON::XS::encode_json          | serialize, unicode | json, serialize            |     57000 |    18     |              1043.39% |              6411.59% | 5.3e-08 |      20 |
 | YAML::Syck::Dump               | serialize, unicode | yaml, serialize            |     69000 |    14     |              1287.86% |              5264.57% | 2.6e-08 |      21 |
 | YAML::XS::Dump                 | serialize          | yaml, serialize            |     75000 |    13     |              1405.75% |              4844.57% | 2.7e-08 |      20 |
 | JSON::PP::encode_json          | serialize          | json, serialize            |    140000 |     7.3   |              2639.11% |              2618.15% | 1.3e-08 |      20 |
 | YAML::Syck::Dump               | serialize          | yaml, serialize            |    100000 |     7     |              2699.21% |              2559.78% | 8.3e-08 |      27 |
 | JSON::Tiny::encode_json        | serialize          | json, serialize            |    170000 |     5.8   |              3333.25% |              2068.59% | 6.7e-09 |      20 |
 | JSON::Create::create_json      | serialize, unicode | json, serialize            |    180000 |     5.4   |              3578.30% |              1924.11% | 1.5e-08 |      21 |
 | JSON::Create::create_json      | serialize          | json, serialize            |    300000 |     3     |              5916.70% |              1137.44% | 3.5e-08 |      20 |
 | Cpanel::JSON::XS::encode_json  | serialize          | json, serialize            |    400000 |     3     |              7599.15% |               867.03% | 9.3e-08 |      25 |
 | JSON::MaybeXS::encode_json     | serialize          | json, serialize            |    450000 |     2.2   |              8824.22% |               734.28% | 7.5e-09 |      20 |
 | JSON::XS::encode_json          | serialize          | json, serialize            |    521000 |     1.92  |             10326.16% |               614.10% | 8.3e-10 |      20 |
 | Sereal::encode_sereal          | serialize, unicode | binary, sereal, serialize  |   2580000 |     0.388 |             51548.43% |                44.15% |   2e-10 |      23 |
 | Sereal::encode_sereal          | serialize          | binary, sereal, serialize  |   2790000 |     0.359 |             55686.02% |                33.46% | 2.1e-10 |      20 |
 | Data::MessagePack::pack        | serialize, unicode | binary, msgpack, serialize |   3400000 |     0.3   |             67702.65% |                 9.81% | 3.1e-10 |      20 |
 | Data::MessagePack::pack        | serialize          | binary, msgpack, serialize |   3720000 |     0.269 |             74352.92% |                 0.00% |   9e-11 |      29 |
 +--------------------------------+--------------------+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+

Formatted as L<Benchmark.pm|Benchmark> result:

                                                           Rate  MEE:e json, serialize serialize, unicode  MEE:e json, serialize serialize  YO:D yaml, serialize serialize, unicode  Y:D yaml, serialize serialize, unicode  Y:D yaml, serialize serialize...
  MEE:e json, serialize serialize, unicode               5000/s                                        --                             -44%                                     -51%                                    -52%                           -71%...
  MEE:e json, serialize serialize                        9300/s                                       81%                               --                                     -11%                                    -12%                           -47%...
  YO:D yaml, serialize serialize, unicode               10000/s                                      106%                              13%                                       --                                     -1%                           -40%...
  Y:D yaml, serialize serialize, unicode                10000/s                                      108%                              14%                                       1%                                      --                           -39%...
  Y:D yaml, serialize serialize                         17000/s                                      244%                              89%                                      67%                                     65%                             --...
  YO:D yaml, serialize serialize                        18000/s                                      250%                              92%                                      70%                                     68%                             1%...
  JP:e_j json, serialize serialize, unicode             25200/s                                      405%                             177%                                     144%                                    142%                            46%...
  JT:e_j json, serialize serialize, unicode             28000/s                                      455%                             205%                                     169%                                    166%                            61%...
  YX:D yaml, serialize serialize, unicode               45000/s                                      809%                             400%                                     340%                                    336%                           163%...
  JM:e_j json, serialize serialize, unicode             49000/s                                      852%                             423%                                     361%                                    357%                           176%...
  CJX:e_j json, serialize serialize, unicode            52000/s                                      952%                             478%                                     410%                                    405%                           205%...
  JX:e_j json, serialize serialize, unicode             57000/s                                     1011%                             511%                                     438%                                    433%                           222%...
  YS:D yaml, serialize serialize, unicode               69000/s                                     1328%                             685%                                     592%                                    585%                           314%...
  YX:D yaml, serialize serialize                        75000/s                                     1438%                             746%                                     646%                                    638%                           346%...
  JP:e_j json, serialize serialize                     140000/s                                     2639%                            1406%                                    1228%                                   1215%                           694%...
  YS:D yaml, serialize serialize                       100000/s                                     2757%                            1471%                                    1285%                                   1271%                           728%...
  JT:e_j json, serialize serialize                     170000/s                                     3348%                            1796%                                    1572%                                   1555%                           900%...
  JC:c_j json, serialize serialize, unicode            180000/s                                     3603%                            1937%                                    1696%                                   1677%                           974%...
  JC:c_j json, serialize serialize                     300000/s                                     6566%                            3566%                                    3133%                                   3100%                          1833%...
  CJX:e_j json, serialize serialize                    400000/s                                     6566%                            3566%                                    3133%                                   3100%                          1833%...
  JM:e_j json, serialize serialize                     450000/s                                     8990%                            4899%                                    4309%                                   4263%                          2536%...
  JX:e_j json, serialize serialize                     521000/s                                    10316%                            5629%                                    4952%                                   4900%                          2920%...
  S:e_s binary, sereal, serialize serialize, unicode  2580000/s                                    51446%                           28250%                                   24900%                                  24642%                         14848%...
  S:e_s binary, sereal, serialize serialize           2790000/s                                    55610%                           30540%                                   26919%                                  26640%                         16055%...
  DM:p binary, msgpack, serialize serialize, unicode  3400000/s                                    66566%                           36566%                                   32233%                                  31900%                         19233%...
  DM:p binary, msgpack, serialize serialize           3720000/s                                    74249%                           40792%                                   35959%                                  35587%                         21461%...
 
 Legends:
   CJX:e_j json, serialize serialize: ds_tags=serialize p_tags=json, serialize participant=Cpanel::JSON::XS::encode_json
   CJX:e_j json, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=json, serialize participant=Cpanel::JSON::XS::encode_json
   DM:p binary, msgpack, serialize serialize: ds_tags=serialize p_tags=binary, msgpack, serialize participant=Data::MessagePack::pack
   DM:p binary, msgpack, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=binary, msgpack, serialize participant=Data::MessagePack::pack
   JC:c_j json, serialize serialize: ds_tags=serialize p_tags=json, serialize participant=JSON::Create::create_json
   JC:c_j json, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=json, serialize participant=JSON::Create::create_json
   JM:e_j json, serialize serialize: ds_tags=serialize p_tags=json, serialize participant=JSON::MaybeXS::encode_json
   JM:e_j json, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=json, serialize participant=JSON::MaybeXS::encode_json
   JP:e_j json, serialize serialize: ds_tags=serialize p_tags=json, serialize participant=JSON::PP::encode_json
   JP:e_j json, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=json, serialize participant=JSON::PP::encode_json
   JT:e_j json, serialize serialize: ds_tags=serialize p_tags=json, serialize participant=JSON::Tiny::encode_json
   JT:e_j json, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=json, serialize participant=JSON::Tiny::encode_json
   JX:e_j json, serialize serialize: ds_tags=serialize p_tags=json, serialize participant=JSON::XS::encode_json
   JX:e_j json, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=json, serialize participant=JSON::XS::encode_json
   MEE:e json, serialize serialize: ds_tags=serialize p_tags=json, serialize participant=MarpaX::ESLIF::ECMA404::encode
   MEE:e json, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=json, serialize participant=MarpaX::ESLIF::ECMA404::encode
   S:e_s binary, sereal, serialize serialize: ds_tags=serialize p_tags=binary, sereal, serialize participant=Sereal::encode_sereal
   S:e_s binary, sereal, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=binary, sereal, serialize participant=Sereal::encode_sereal
   Y:D yaml, serialize serialize: ds_tags=serialize p_tags=yaml, serialize participant=YAML::Dump
   Y:D yaml, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=yaml, serialize participant=YAML::Dump
   YO:D yaml, serialize serialize: ds_tags=serialize p_tags=yaml, serialize participant=YAML::Old::Dump
   YO:D yaml, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=yaml, serialize participant=YAML::Old::Dump
   YS:D yaml, serialize serialize: ds_tags=serialize p_tags=yaml, serialize participant=YAML::Syck::Dump
   YS:D yaml, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=yaml, serialize participant=YAML::Syck::Dump
   YX:D yaml, serialize serialize: ds_tags=serialize p_tags=yaml, serialize participant=YAML::XS::Dump
   YX:D yaml, serialize serialize, unicode: ds_tags=serialize, unicode p_tags=yaml, serialize participant=YAML::XS::Dump

 #table11#
 {dataset=>"undef"}
 +--------------------------------+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | participant                    | p_tags                     | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |
 +--------------------------------+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | YAML::Dump                     | yaml, serialize            |     23000 |    44     |                 0.00% |             27821.63% | 1.7e-07 |      20 |
 | YAML::Old::Dump                | yaml, serialize            |     23000 |    44     |                 0.80% |             27600.29% | 9.5e-08 |      25 |
 | MarpaX::ESLIF::ECMA404::encode | json, serialize            |    120000 |     8.2   |               438.15% |              5088.46% | 1.3e-08 |      20 |
 | YAML::Syck::Dump               | yaml, serialize            |    240000 |     4.1   |               963.06% |              2526.53% | 2.2e-08 |      20 |
 | JSON::Tiny::encode_json        | json, serialize            |    450000 |     2.22  |              1880.06% |              1310.14% | 7.8e-10 |      23 |
 | JSON::PP::encode_json          | json, serialize            |    549000 |     1.82  |              2314.83% |              1056.26% | 8.3e-10 |      20 |
 | YAML::XS::Dump                 | yaml, serialize            |    598000 |     1.67  |              2529.80% |               961.74% | 8.3e-10 |      20 |
 | Sereal::encode_sereal          | binary, sereal, serialize  |   3770000 |     0.266 |             16468.29% |                68.52% |   1e-10 |      23 |
 | Data::MessagePack::pack        | binary, msgpack, serialize |   5600000 |     0.18  |             24407.23% |                13.93% | 4.2e-10 |      20 |
 | JSON::MaybeXS::encode_json     | json, serialize            |   5800000 |     0.17  |             25256.72% |                10.12% | 4.1e-10 |      21 |
 | Cpanel::JSON::XS::encode_json  | json, serialize            |   5900000 |     0.17  |             26036.06% |                 6.83% | 3.1e-10 |      20 |
 | JSON::XS::encode_json          | json, serialize            |   6000000 |     0.17  |             26232.04% |                 6.04% | 4.2e-10 |      20 |
 | JSON::Create::create_json      | json, serialize            |   6000000 |     0.2   |             27821.63% |                 0.00% | 5.5e-09 |      20 |
 +--------------------------------+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+

Formatted as L<Benchmark.pm|Benchmark> result:

                                        Rate  Y:D yaml, serialize  YO:D yaml, serialize  MEE:e json, serialize  YS:D yaml, serialize  JT:e_j json, serialize  JP:e_j json, serialize  YX:D yaml, serialize  S:e_s binary, sereal, serialize  JC:c_j json, ...
  Y:D yaml, serialize                23000/s                   --                    0%                   -81%                  -90%                    -94%                    -95%                  -96%                             -99%               ...
  YO:D yaml, serialize               23000/s                   0%                    --                   -81%                  -90%                    -94%                    -95%                  -96%                             -99%               ...
  MEE:e json, serialize             120000/s                 436%                  436%                     --                  -50%                    -72%                    -77%                  -79%                             -96%               ...
  YS:D yaml, serialize              240000/s                 973%                  973%                   100%                    --                    -45%                    -55%                  -59%                             -93%               ...
  JT:e_j json, serialize            450000/s                1881%                 1881%                   269%                   84%                      --                    -18%                  -24%                             -88%               ...
  JP:e_j json, serialize            549000/s                2317%                 2317%                   350%                  125%                     21%                      --                   -8%                             -85%               ...
  YX:D yaml, serialize              598000/s                2534%                 2534%                   391%                  145%                     32%                      8%                    --                             -84%               ...
  S:e_s binary, sereal, serialize  3770000/s               16441%                16441%                  2982%                 1441%                    734%                    584%                  527%                               --               ...
  JC:c_j json, serialize           6000000/s               21900%                21900%                  3999%                 1949%                   1010%                    810%                  735%                              33%               ...
  DM:p binary, msgpack, serialize  5600000/s               24344%                24344%                  4455%                 2177%                   1133%                    911%                  827%                              47%               ...
  JM:e_j json, serialize           5800000/s               25782%                25782%                  4723%                 2311%                   1205%                    970%                  882%                              56%               ...
  CJX:e_j json, serialize          5900000/s               25782%                25782%                  4723%                 2311%                   1205%                    970%                  882%                              56%               ...
  JX:e_j json, serialize           6000000/s               25782%                25782%                  4723%                 2311%                   1205%                    970%                  882%                              56%               ...
 
 Legends:
   CJX:e_j json, serialize: p_tags=json, serialize participant=Cpanel::JSON::XS::encode_json
   DM:p binary, msgpack, serialize: p_tags=binary, msgpack, serialize participant=Data::MessagePack::pack
   JC:c_j json, serialize: p_tags=json, serialize participant=JSON::Create::create_json
   JM:e_j json, serialize: p_tags=json, serialize participant=JSON::MaybeXS::encode_json
   JP:e_j json, serialize: p_tags=json, serialize participant=JSON::PP::encode_json
   JT:e_j json, serialize: p_tags=json, serialize participant=JSON::Tiny::encode_json
   JX:e_j json, serialize: p_tags=json, serialize participant=JSON::XS::encode_json
   MEE:e json, serialize: p_tags=json, serialize participant=MarpaX::ESLIF::ECMA404::encode
   S:e_s binary, sereal, serialize: p_tags=binary, sereal, serialize participant=Sereal::encode_sereal
   Y:D yaml, serialize: p_tags=yaml, serialize participant=YAML::Dump
   YO:D yaml, serialize: p_tags=yaml, serialize participant=YAML::Old::Dump
   YS:D yaml, serialize: p_tags=yaml, serialize participant=YAML::Syck::Dump
   YX:D yaml, serialize: p_tags=yaml, serialize participant=YAML::XS::Dump


Benchmark with C<< bencher -m Serializers --include-participant-tags deserialize >>:

 #table12#
 {dataset=>"json:array_int_10"}
 +---------------------------------+---------------------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | participant                     | p_tags                                | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |



( run in 0.584 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )