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

Comparing CBOR-XS/XS.pm (file contents):
Revision 1.14 by root, Tue Oct 29 20:59:16 2013 UTC vs.
Revision 1.15 by root, Tue Oct 29 21:13:28 2013 UTC

46In short, CBOR is a faster and very compact binary alternative to JSON, 46In short, CBOR is a faster and very compact binary alternative to JSON,
47with the added ability of supporting serialisation of Perl objects. (JSON 47with the added ability of supporting serialisation of Perl objects. (JSON
48often compresses better than CBOR though, so if you plan to compress the 48often compresses better than CBOR though, so if you plan to compress the
49data later you might want to compare both formats first). 49data later you might want to compare both formats first).
50 50
51To give you a general idea, with texts in the megabyte range, C<CBOR::XS> 51To give you a general idea about speed, with texts in the megabyte range,
52usually encodes roughly twice as fast as L<Storable> or L<JSON::XS> and 52C<CBOR::XS> usually encodes roughly twice as fast as L<Storable> or
53decodes about 15%-30% faster than those. The shorter the data, the worse 53L<JSON::XS> and decodes about 15%-30% faster than those. The shorter the
54L<Storable> performs in comparison. 54data, the worse L<Storable> performs in comparison.
55
56As for compactness, C<CBOR::XS> encoded data structures are usually about
5720% smaller than the same data encoded as (compact) JSON or L<Storable>.
55 58
56The primary goal of this module is to be I<correct> and the secondary goal 59The primary goal of this module is to be I<correct> and the secondary goal
57is to be I<fast>. To reach the latter goal it was written in C. 60is to be I<fast>. To reach the latter goal it was written in C.
58 61
59See MAPPING, below, on how CBOR::XS maps perl values to CBOR values and 62See MAPPING, below, on how CBOR::XS maps perl values to CBOR values and

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines