Group
Extension

Matches 1

Text-ZPL ( A/AV/AVENJ/Text-ZPL-0.003001.tar.gz, AVENJ, 2016; MetaCPAN )
Text-ZPL/bench/vs_json_pp.pl ( view source; MetaCPAN )
use strict; use warnings;
use Benchmark 'cmpthese';

use JSON::Tiny ();
use JSON::PP 'encode_json', 'decode_json';
use Text::ZPL;

my $struct = +{
  foo => 'bar',
  bar => 'baz',
  hash => +{
    x =>
[ 1 .. 100 ],
  },
};

my $tiny = JSON::Tiny->new;

my ($js, $tjs, $zpl);
cmpthese( 2_000, +{
  encode_jsonpp => sub {
    $js = encode_json $struct
  },
  encode_jsontiny => sub {
    $tjs = $tiny->e
b {
    $zpl = encode_zpl $struct
  },
});

cmpthese( 2_000, +{
  decode_jsonpp => sub {
    decode_json $js
  },
  decode_jsontiny => sub {
    $tiny->decode($tjs)
  },
  decode_zpl => sub {
    deco

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.