diff --git a/perl/benchmark/deserialize.pl b/perl/benchmark/deserialize.pl index 9658c0c8..634a79ed 100644 --- a/perl/benchmark/deserialize.pl +++ b/perl/benchmark/deserialize.pl @@ -5,11 +5,13 @@ use JSON::XS; use Benchmark ':all'; use Storable; +#$Data::MessagePack::PreferInteger = 1; + my $a = { "method" => "handleMessage", "params" => [ "user1", "we were just talking" ], "id" => undef, - "array" => [ 1, 11, 234, -5, 1e5, 1e7, 1, 0, 3.14, sqrt(2) ] + "array" => [ 1, 1024, 70000, -5, 1e5, 1e7, 1, 0, 3.14, sqrt(2) ], }; my $j = JSON::XS::encode_json($a); my $m = Data::MessagePack->pack($a); diff --git a/perl/benchmark/serialize.pl b/perl/benchmark/serialize.pl index ee9e7a45..e0509ffa 100644 --- a/perl/benchmark/serialize.pl +++ b/perl/benchmark/serialize.pl @@ -9,7 +9,7 @@ my $a = { "method" => "handleMessage", "params" => [ "user1", "we were just talking" ], "id" => undef, - "array" => [ 1, 11, 234, -5, 1e5, 1e7, 1, 0, 3.14, sqrt(2) ] + "array" => [ 1, 1024, 70000, -5, 1e5, 1e7, 1, 0, 3.14, sqrt(2) ], }; print "-- serialize\n";