Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 2.92 KB

performance_fp.md

File metadata and controls

37 lines (30 loc) · 2.92 KB

Read and Write Time Comparison

Input filename Size (MB) Content
data/output/persons_fp.json 697.35 Text,doubles
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 17.857 10.33 1057 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 25.571 19.382 1234 Uses std::map for objects. Uses slightly modified Grisu2 implementation by Florian Loitsch for printing doubles, expect faster serializing.
cJSON 24.152 69.649 5813 Inefficient storage (items do not share the same space), expect larger memory footprint. Uses sprintf and sscanf to support locale-independent round-trip.
json11 24.445 46.515 4905 Uses pimpl idiom, implementation uses virtual inheritance, expect larger memory footprint.
rapidjson 5.263 7.552 1099 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 134.955 80.718 6163 Uses std::map for both arrays and objects, expect larger memory footprint.
json_spirit 336.491 141.197 2732 Uses Boost spirit parsing, expect slower parsing.
taojson 63.515 13.888 2654 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.