By default, Sereal will emit a repetition marker for hash keys
that were already previously encountered. Depending on your data
structure, this can save quite a bit of space in the generated
document. Consider, for example, encoding an array of many objects
of the same class. But it may not save anything if you dont have
a lot of repeated hash keys or dont even encode any hashes to
In those cases, you can turn this feature off with the no_shared_hashkeys option for a small but measurable speed-up.
|dedupe_strings||If set, this option will apply the de-duplication logic to all strings that is only applied to hash keys by default. This can be quite expensive in both memory and performance. The same is true for aliased_dedupe_strings.|
|snappy and snappy_incr||Enabling Snappy compression can (but doesnt have to) make your Sereal documents significantly smaller. How effective this compression is for you depends entirely on the nature of your data. Snappy compression is designed to be very fast. The additional space savings are very often worth the small overhead.|
|freeze_callbacks||Using custom Perl FREEZE callbacks is very expensive. If enabled, the encoder has to do a method lookup at least once per class of an object being serialized. If a FREEZE hook actually exists, calling it will be even more expensive. If you care about ultimate performance, use with care.|
|sort_keys||This option forces the encoder to always sort the entries in a hash by its keys before writing them to the Sereal document. This can be somewhat expensive for large hashes.|
Perl variables (scalars specifically) can, at the same time, hold multiple representations of the same data. If you create and integer and use it as a string, it will be cached in its string form. Sereal attempts to detect the most compact of these representations for encoding, but can not always succeed. For example, if a data structure was previously also traversed by certain other serialization modules (such as Storable), then the scalars in the structure may have been irrevocably upgraded to a more complex (and bigger) type. This is only an issue in crude benchmarks. So if you plan to benchmark serialization, take care not to re-use the test data structure between serializers for results that do not depend on the order of operations.
For reporting bugs, please use the github bug tracker at <http://github.com/Sereal/Sereal/issues>.
For support and discussion of Sereal, there are two Google Groups:
Announcements around Sereal (extremely low volume): <https://groups.google.com/forum/?fromgroups#!forum/sereal-announce>
Sereal development list: <https://groups.google.com/forum/?fromgroups#!forum/sereal-dev>
Yves Orton <email@example.com>
Steffen Mueller <firstname.lastname@example.org>
AEvar Arnfjoerd` Bjarmason <email@example.com>
Daniel Dragan <firstname.lastname@example.org> (Windows support and bugfixes)
Some inspiration and code was taken from Marc Lehmanns excellent JSON::XS module due to obvious overlap in problem domain.
This module was originally developed for Booking.com. With approval from Booking.com, this module was generalized and published on CPAN, for which the authors would like to express their gratitude.
Copyright (C) 2012, 2013, 2014 by Steffen Mueller Copyright (C) 2012, 2013, 2014 by Yves Orton
The license for the code in this distribution is the following, with the exceptions listed below:
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Except portions taken from Marc Lehmanns code for the JSON::XS module, which is licensed under the same terms as this module. (Many thanks to Marc for inspiration, and code.)
Also except the code for Snappy compression library, whose license is reproduced below and which, to the best of our knowledge, is compatible with this modules license. The license for the enclosed Snappy code is:
Copyright 2011, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|perl v5.20.3||SEREAL::PERFORMANCE (3)||2014-12-24|