mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-12 22:36:56 +02:00
added perl support
This commit is contained in:
16
perl/benchmark/p1.pl
Normal file
16
perl/benchmark/p1.pl
Normal file
@@ -0,0 +1,16 @@
|
||||
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) },
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user