ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/JSON-XS/eg/bench
(Generate patch)

Comparing JSON-XS/eg/bench (file contents):
Revision 1.6 by root, Sat Mar 24 22:55:16 2007 UTC vs.
Revision 1.8 by root, Tue Apr 3 23:59:04 2007 UTC

3# Usage: bench json-file 3# Usage: bench json-file
4 4
5use JSON; 5use JSON;
6use JSON::DWIW; 6use JSON::DWIW;
7use JSON::PC; 7use JSON::PC;
8use JSON::XS; 8use JSON::XS qw(to_json from_json);
9use JSON::Syck; 9use JSON::Syck;
10 10
11use Time::HiRes; 11use Time::HiRes;
12use List::Util; 12use List::Util;
13 13
34# print $fh2 $json; 34# print $fh2 $json;
35# warn length $json; 35# warn length $json;
36#} 36#}
37 37
38my %tst = ( 38my %tst = (
39 "JSON" => ['objToJson $perl' , 'jsonToObj $json'], 39# "JSON" => ['objToJson $perl' , 'jsonToObj $json'],
40 "JSON::DWIW" => ['$dwiw->to_json ($perl)', '$dwiw->from_json ($json)'], 40 "JSON::DWIW" => ['$dwiw->to_json ($perl)', '$dwiw->from_json ($json)'],
41 "JSON::PC" => ['$pc->convert ($perl)' , '$pc->parse ($json)'], 41 "JSON::PC" => ['$pc->convert ($perl)' , '$pc->parse ($json)'],
42 "JSON::Syck" => ['JSON::Syck::Dump $perl', 'JSON::Syck::Load $json'], 42 "JSON::Syck" => ['JSON::Syck::Dump $perl', 'JSON::Syck::Load $json'],
43 "JSON::XS" => ['to_json $perl' , 'from_json $json'], 43 "JSON::XS" => ['to_json $perl' , 'from_json $json'],
44 "JSON::XS/2" => ['$xs2->encode ($perl)' , '$xs2->decode ($json)'], 44 "JSON::XS/2" => ['$xs2->encode ($perl)' , '$xs2->decode ($json)'],

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines