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

Comparing JSON-XS/README (file contents):
Revision 1.11 by root, Wed May 9 16:35:21 2007 UTC vs.
Revision 1.12 by root, Wed Jun 6 18:17:13 2007 UTC

541 It seems that JSON::XS is surprisingly fast, as shown in the following 541 It seems that JSON::XS is surprisingly fast, as shown in the following
542 tables. They have been generated with the help of the "eg/bench" program 542 tables. They have been generated with the help of the "eg/bench" program
543 in the JSON::XS distribution, to make it easy to compare on your own 543 in the JSON::XS distribution, to make it easy to compare on your own
544 system. 544 system.
545 545
546 First comes a comparison between various modules using a very short JSON 546 First comes a comparison between various modules using a very short
547 string: 547 single-line JSON string:
548 548
549 {"method": "handleMessage", "params": ["user1", "we were just talking"], "id": null} 549 {"method": "handleMessage", "params": ["user1", "we were just talking"], \
550 "id": null, "array":[1,11,234,-5,1e5,1e7, true, false]}
550 551
551 It shows the number of encodes/decodes per second (JSON::XS uses the 552 It shows the number of encodes/decodes per second (JSON::XS uses the
552 functional interface, while JSON::XS/2 uses the OO interface with 553 functional interface, while JSON::XS/2 uses the OO interface with
553 pretty-printing and hashkey sorting enabled). Higher is better: 554 pretty-printing and hashkey sorting enabled). Higher is better:
554 555
555 module | encode | decode | 556 module | encode | decode |
556 -----------|------------|------------| 557 -----------|------------|------------|
557 JSON | 11488.516 | 7823.035 | 558 JSON | 7645.468 | 4208.613 |
558 JSON::DWIW | 94708.054 | 129094.260 | 559 JSON::DWIW | 68534.379 | 79437.576 |
559 JSON::PC | 63884.157 | 128528.212 | 560 JSON::PC | 65948.176 | 78251.940 |
560 JSON::Syck | 34898.677 | 42096.911 | 561 JSON::Syck | 23379.621 | 28416.694 |
561 JSON::XS | 654027.064 | 396423.669 | 562 JSON::XS | 388361.481 | 199728.762 |
562 JSON::XS/2 | 371564.190 | 371725.613 | 563 JSON::XS/2 | 218453.333 | 192399.266 |
564 JSON::XS/3 | 338250.323 | 192399.266 |
565 Storable | 15732.573 | 28571.553 |
563 -----------+------------+------------+ 566 -----------+------------+------------+
564 567
565 That is, JSON::XS is more than six times faster than JSON::DWIW on 568 That is, JSON::XS is about five times faster than JSON::DWIW on
566 encoding, more than three times faster on decoding, and about thirty 569 encoding, about three times faster on decoding, and over fourty times
567 times faster than JSON, even with pretty-printing and key sorting. 570 faster than JSON, even with pretty-printing and key sorting. It also
571 compares favourably to Storable for small amounts of data.
568 572
569 Using a longer test string (roughly 18KB, generated from Yahoo! Locals 573 Using a longer test string (roughly 18KB, generated from Yahoo! Locals
570 search API (http://nanoref.com/yahooapis/mgPdGg): 574 search API (http://nanoref.com/yahooapis/mgPdGg):
571 575
572 module | encode | decode | 576 module | encode | decode |
573 -----------|------------|------------| 577 -----------|------------|------------|
574 JSON | 273.023 | 44.674 | 578 JSON | 254.685 | 37.665 |
575 JSON::DWIW | 1089.383 | 1145.704 | 579 JSON::DWIW | 1014.244 | 1087.678 |
580 JSON::PC | 3602.116 | 2307.352 |
581 JSON::Syck | 558.035 | 776.263 |
576 JSON::PC | 3097.419 | 2393.921 | 582 JSON::XS | 5747.196 | 3543.684 |
577 JSON::Syck | 514.060 | 843.053 |
578 JSON::XS | 6479.668 | 3636.364 |
579 JSON::XS/2 | 3774.221 | 3599.124 | 583 JSON::XS/2 | 3968.121 | 3589.170 |
584 JSON::XS/3 | 6105.246 | 3561.134 |
585 Storable | 4456.337 | 5320.020 |
580 -----------+------------+------------+ 586 -----------+------------+------------+
581 587
582 Again, JSON::XS leads by far. 588 Again, JSON::XS leads by far.
583 589
584 On large strings containing lots of high unicode characters, some 590 On large strings containing lots of high unicode characters, some

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines