Input filename | Size (MB) | Content |
---|---|---|
data/output/persons.json | 897.95 | Text,integers |
Environment | Windows, Intel |
---|---|
Computer | Lenovo Thinkpad X Extreme with 8 cores, 16 hardware threads, 32 GB memory, 2 TB solid state drive |
Operating system | Windows 2011 |
Compiler | Visual Studio 2022 |
Language | C++ 2017 |
Library | Version |
---|---|
jsoncons | 0.170.0 |
nlohmann | 3.11.2 |
cJSON | 1.7.15 |
json11 | 2017-06-20-2 |
rapidjson | 2020-02-08 |
jsoncpp | 1.9.5 |
json_spirit | 4.1.0-1 |
taojson | 2020-09-14 |
Library | Time to read (s) | Time to write (s) | Memory footprint of json value (MB) | Remarks |
---|---|---|---|---|
jsoncons | 12.788 | 5.457 | 2057 | Uses sorted std::vector of key/value pairs for objects, expect smaller memory footprint.Uses slightly modified grisu3_59_56 implementation by Florian Loitsch plus fallback for printing doubles, expect faster serializing. |
nlohmann | 35.384 | 18.998 | 2216 | Uses std::map for objects. Uses slightly modified Grisu2 implementation by Florian Loitsch for printing doubles, expect faster serializing. |
cJSON | 33.699 | 106.943 | 11033 | Inefficient storage (items do not share the same space), expect larger memory footprint. Uses sprintf and sscanf to support locale-independent round-trip. |
json11 | 52.256 | 24.174 | 9145 | Uses pimpl idiom, implementation uses virtual inheritance, expect larger memory footprint. |
rapidjson | 17.18 | 4.537 | 2166 | Uses custom floating point parsing, expect faster parsing. Uses girsu3 for printing doubles, expect faster serializing. Uses custom allocation and flat map for objects, expect smaller memory footprint. |
jsoncpp | 90.343 | 41.622 | 12176 | Uses std::map for both arrays and objects, expect larger memory footprint. |
json_spirit | 468.412 | 68.201 | 5392 | Uses Boost spirit parsing, expect slower parsing. |
taojson | 115.795 | 16.718 | 5152 | Uses modified google/double conversion routines for parsing doubles. Uses modified jeaiii/itoa routines for outputting integers. Uses slightly modified Grisu2 implementation by Florian Loitsch for printing doubles, expect faster serializing. |