Skip to content

japhb/App-SerializerPerf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status

NAME

serializer-perf - Performance tests for Raku data serializer codecs

SYNOPSIS

# SETUP METHOD 1: Installing into Raku module repository
zef update
zef install App::SerializerPerf
serializer-perf --source=$HOME/.zef/store/360.zef.pm

# SETUP METHOD 2: Running from a git clone, rather than installing
git clone git@github.com:japhb/App-SerializerPerf.git
cd App-SerializerPerf
zef update
zef install --deps-only .
raku -I. bin/serializer-perf --source=$HOME/.zef/store/360.zef.pm

# OPTIONS:

 --runs=<UInt>    Runs per test (for stable results) [default: 1]
 --count=<UInt>   Encodes/decodes per run (for sufficient duration) [default: 1]
 --source=<Path>  Test file containing JSON data [default: fez-test.json]

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:

Codec Format Size Speed Fidelity Human-Friendly
BSON::Document BSON Mixed Poor Poor Poor
BSON::Simple BSON Mixed Fair Fair Poor
CBOR::Simple CBOR BEST BEST Good Poor
JSON::Fast JSON Fair Good Fair Good
JSON::Hjson JSON * Poor Fair Good*
Data::MessagePack MessagePack Good Mixed Fair Poor
MessagePack MessagePack * Mixed Poor Poor*
TOML::Thumb TOML Poor Mixed Poor Good
TOML(tony-o) TOML Poor Poor Poor Good
Config::TOML TOML Poor Poor Poor Good
YAMLish YAML Poor Poor Fair BEST
.raku/EVAL Raku Poor Poor BEST Fair

(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-2023 Geoffrey Broadwell

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

About

Performance and fidelity tests for Raku data serialization codecs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages