From ea41db4cc7b2e7434b5268233d7e31de07c64517 Mon Sep 17 00:00:00 2001 From: Tokuhiro Matsuno Date: Wed, 15 Apr 2009 23:02:27 +0900 Subject: perl: renamed benchmark script --- perl/benchmark/p1.pl | 16 ---------------- perl/benchmark/serialize.pl | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 16 deletions(-) delete mode 100644 perl/benchmark/p1.pl create mode 100644 perl/benchmark/serialize.pl diff --git a/perl/benchmark/p1.pl b/perl/benchmark/p1.pl deleted file mode 100644 index 257932e..0000000 --- a/perl/benchmark/p1.pl +++ /dev/null @@ -1,16 +0,0 @@ -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) }, - } -); - diff --git a/perl/benchmark/serialize.pl b/perl/benchmark/serialize.pl new file mode 100644 index 0000000..626ae03 --- /dev/null +++ b/perl/benchmark/serialize.pl @@ -0,0 +1,18 @@ +use strict; +use warnings; +use Data::MessagePack; +use JSON::XS; +use Benchmark ':all'; + +my $a = [0..2**24]; + +print "-- serialize\n"; +print "JSON::XS: $JSON::XS::VERSION\n"; +print "Data::MessagePack: $Data::MessagePack::VERSION\n"; +cmpthese( + -1 => { + json => sub { JSON::XS::encode_json($a) }, + mp => sub { Data::MessagePack->pack($a) }, + } +); + -- cgit v1.2.1