mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 13:02:13 +01:00
17 lines
269 B
Perl
17 lines
269 B
Perl
![]() |
use strict;
|
||
|
use warnings;
|
||
|
use Data::MessagePack;
|
||
|
use JSON::XS;
|
||
|
use Benchmark ':all';
|
||
|
|
||
|
my $a = [0..2**24];
|
||
|
|
||
|
print "-- serialize\n";
|
||
|
cmpthese(
|
||
|
-1 => {
|
||
|
json => sub { JSON::XS::encode_json($a) },
|
||
|
mp => sub { Data::MessagePack->pack($a) },
|
||
|
}
|
||
|
);
|
||
|
|