Raku Land

App::SerializerPerf

zef:japhb

Actions Status

NAME

serializer-perf - Performance tests for Raku data serializer codecs

SYNOPSIS

serializer-perf [--runs=UInt] [--count=UInt] [--source=Path]

 --runs=<UInt>    Runs per test (for stable results)
 --count=<UInt>   Encodes/decodes per run (for sufficient duration)
 --source=<Path>  Test file containing JSON data

DESCRIPTION

serializer-perf is a test suite of performance and correctness (fidelity) tests for Raku data serializer codecs. It is currently able to test the following codecs:

CodecFormatSizeSpeedFidelityHuman-Friendly
BSON::DocumentBSONMixedPoorPoorPoor
BSON::SimpleBSONMixedFairFairPoor
CBOR::SimpleCBORBESTBESTGoodPoor
JSON::FastJSONFairGoodFairGood
JSON::HjsonJSON*PoorFairGood*
Data::MessagePackMessagePackGoodMixedFairPoor
MessagePackMessagePack*MixedPoorPoor*
TOML::ThumbTOMLPoorMixedPoorGood
TOML(tony-o)TOMLPoorPoorPoorGood
Config::TOMLTOMLPoorPoorPoorGood
YAMLishYAMLPoorPoorFairBEST
.raku/EVALRakuPoorPoorBESTFair

(Note: JSON::Hjson is a decoder only, and has no native encode ability. Thus performance and fidelity was tested against inputs in the JSON subset of Hjson, though of course the point of Hjson is to allow more human-friendly variation in data formatting -- similar to YAML in that respect. Similarly, MessagePack is a decoder only as well, with no native encode ability; it was tested with data packed by Data::MessagePack.)

Because some of the tests are very slow, the default values for --runs and --count are both set to 1. If only testing the faster codecs (those with Speed of Fair or better in the table above), these will be too low; 5 runs and 100 count are more appropriate values in that case.

AUTHOR

Geoffrey Broadwell gjb@sonic.net

COPYRIGHT AND LICENSE

Copyright 2021-2022 Geoffrey Broadwell

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.