mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
Add various integers to benchmarks
This commit is contained in:
parent
af73b9d11b
commit
0e0a2aa981
2 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue