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

Comparing JSON-XS/XS.pm (file contents):
Revision 1.47 by root, Mon Jun 25 06:57:42 2007 UTC vs.
Revision 1.48 by root, Mon Jun 25 22:11:39 2007 UTC

711It shows the number of encodes/decodes per second (JSON::XS uses 711It shows the number of encodes/decodes per second (JSON::XS uses
712the functional interface, while JSON::XS/2 uses the OO interface 712the functional interface, while JSON::XS/2 uses the OO interface
713with pretty-printing and hashkey sorting enabled, JSON::XS/3 enables 713with pretty-printing and hashkey sorting enabled, JSON::XS/3 enables
714shrink). Higher is better: 714shrink). Higher is better:
715 715
716 Storable | 15779.925 | 14169.946 |
717 -----------+------------+------------+
716 module | encode | decode | 718 module | encode | decode |
717 -----------|------------|------------| 719 -----------|------------|------------|
718 JSON | 7645.468 | 4208.613 | 720 JSON | 4990.842 | 4088.813 |
719 JSON::DWIW | 40721.398 | 77101.176 | 721 JSON::DWIW | 51653.990 | 71575.154 |
720 JSON::PC | 65948.176 | 78251.940 | 722 JSON::PC | 65948.176 | 74631.744 |
721 JSON::Syck | 22844.793 | 26479.192 | 723 JSON::PP | 8931.652 | 3817.168 |
724 JSON::Syck | 24877.248 | 27776.848 |
722 JSON::XS | 388361.481 | 199728.762 | 725 JSON::XS | 388361.481 | 227951.304 |
723 JSON::XS/2 | 218453.333 | 192399.266 | 726 JSON::XS/2 | 227951.304 | 218453.333 |
724 JSON::XS/3 | 338250.323 | 192399.266 | 727 JSON::XS/3 | 338250.323 | 218453.333 |
725 Storable | 15779.925 | 14169.946 | 728 Storable | 16500.016 | 135300.129 |
726 -----------+------------+------------+ 729 -----------+------------+------------+
727 730
728That is, JSON::XS is about five times faster than JSON::DWIW on encoding, 731That is, JSON::XS is about five times faster than JSON::DWIW on encoding,
729about three times faster on decoding, and over fourty times faster 732about three times faster on decoding, and over fourty times faster
730than JSON, even with pretty-printing and key sorting. It also compares 733than JSON, even with pretty-printing and key sorting. It also compares
733Using a longer test string (roughly 18KB, generated from Yahoo! Locals 736Using a longer test string (roughly 18KB, generated from Yahoo! Locals
734search API (http://nanoref.com/yahooapis/mgPdGg): 737search API (http://nanoref.com/yahooapis/mgPdGg):
735 738
736 module | encode | decode | 739 module | encode | decode |
737 -----------|------------|------------| 740 -----------|------------|------------|
738 JSON | 254.685 | 37.665 | 741 JSON | 55.260 | 34.971 |
739 JSON::DWIW | 843.343 | 1049.731 | 742 JSON::DWIW | 825.228 | 1082.513 |
740 JSON::PC | 3602.116 | 2307.352 | 743 JSON::PC | 3571.444 | 2394.829 |
744 JSON::PP | 210.987 | 32.574 |
741 JSON::Syck | 505.107 | 787.899 | 745 JSON::Syck | 552.551 | 787.544 |
742 JSON::XS | 5747.196 | 3690.220 | 746 JSON::XS | 5780.463 | 4854.519 |
743 JSON::XS/2 | 3968.121 | 3676.634 | 747 JSON::XS/2 | 3869.998 | 4798.975 |
744 JSON::XS/3 | 6105.246 | 3662.508 | 748 JSON::XS/3 | 5862.880 | 4798.975 |
745 Storable | 4417.337 | 5285.161 | 749 Storable | 4445.002 | 5235.027 |
746 -----------+------------+------------+ 750 -----------+------------+------------+
747 751
748Again, JSON::XS leads by far (except for Storable which non-surprisingly 752Again, JSON::XS leads by far (except for Storable which non-surprisingly
749decodes faster). 753decodes faster).
750 754

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines