Skip to content

v2.0.0-beta.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@pelletier pelletier released this 04 Jun 15:20
· 203 commits to v2 since this release
618f018

Work on performance improvement.

Execution time speedup compared to other Go TOML libraries:

Benchmarkgo-toml v1BurntSushi/toml
Marshal/HugoFrontMatter2.0x2.0x
Marshal/ReferenceFile/map1.8x2.0x
Marshal/ReferenceFile/struct2.7x2.7x
Unmarshal/HugoFrontMatter3.0x2.6x
Unmarshal/ReferenceFile/map3.0x3.1x
Unmarshal/ReferenceFile/struct5.9x6.6x
See more

The table above has the results of the most common use-cases. The table below contains the results of all benchmarks, including unrealistic ones. It is provided for completeness.

Benchmarkgo-toml v1BurntSushi/toml
Marshal/SimpleDocument/map1.7x2.1x
Marshal/SimpleDocument/struct2.6x2.9x
Unmarshal/SimpleDocument/map4.1x2.9x
Unmarshal/SimpleDocument/struct6.3x4.1x
UnmarshalDataset/example3.5x2.4x
UnmarshalDataset/code2.2x2.8x
UnmarshalDataset/twitter2.8x2.1x
UnmarshalDataset/citm_catalog2.3x1.5x
UnmarshalDataset/config4.2x3.2x
[Geo mean]3.0x2.7x

This table can be generated with ./ci.sh benchmark -a -html.