fast_float
RapidJSON
Our great sponsors
fast_float | RapidJSON | |
---|---|---|
15 | 15 | |
1,256 | 13,797 | |
2.5% | 1.0% | |
8.8 | 6.1 | |
8 days ago | 6 days ago | |
C++ | C++ | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fast_float
-
Parquet: More than just “Turbo CSV”
> Google put in significant engineering effort into "Ryu", a parsing library for double-precision floating point numbers: https://github.com/ulfjack/ryu
It's not a parsing library, but a printing one, i.e., double -> string. https://github.com/fastfloat/fast_float is a parsing library, i.e., string -> double, not by Google though, but was indeed motivated by parsing JSON fast https://lemire.me/blog/2020/03/10/fast-float-parsing-in-prac...
-
Can sanitizers find the two bugs I wrote in C++?
This makes sense for integers but betware floating point from_chars - libc++ still doesn't implement it and libstdc++ implements it by wrapping locale-dependent libc functions which involves temporarily changing the thread locale and possibly memory allocation to make the passed string 0-terminated. IMO libstdc++'s checkbox "solution" is worse than not implementing it at all - user's are better off using Lemire's API-compatible fast_float implementation [0].
-
Parsing can become accidentally quadratic because of sscanf
Just above this comment is a merged PR, which references fast_float library: https://github.com/fastfloat/fast_float
-
Making Rust Float Parsing Fast: libcore Edition
Daniel Lemire @lemire (creator of the algorithm, author of the C++ implementation, and provided constant feedback to help guide the PR).
-
RapidObj v0.1 - A fast, header-only, C++17 library for parsing Wavefront .obj files.
And out of 6,000 lines in the file, at least 3000 are other people's code: earcut for polygon triangulation and fast_float because .obj files typically contain a lot of floating point numbers so it's important to parse them quickly.
This library is optimised for loading and parsing big .obj files. Optimisation techniques used are: asynchronous IO, parallel parsing, and it uses fast_float to quickly parse floating point numbers.
-
First release of dragonbox, a fast float-to-string conversion algorithm, is available
How this compares to https://github.com/fastfloat/fast_float ?
- Eisel-Lemire Algorithm
-
Ask HN: C++17/C++20 example projects with good style?
Some fun things I've figured out:
* https://github.com/fastfloat/fast_float <-- for fast float/double conversion
* from_chars() for fast integer conversion (though I benchmarked a few that were faster)
* https://github.com/simdjson/simdjson <-- apparently the fastest JSON library
It's hard to program normal anymore, for every little thing I ask myself "but I want it faster!" TypeScript was so much easier, other than O(n) and friends, I never cared xD
- Fastfloat – C++ library 4x faster than strtod
RapidJSON
-
Has anyone embedded a web-UI into a C++ project?
Here's what I did: - I bought a theme that I liked, and used mstch as template engine (matched the theme's template format) - Imported rapidjson for parsing JSON, and used mstch for generating JSON (the JSON I generate is simple enough that I can do this) - Wrote an HTTP handler class for each page that handles the GET and POST requests, generating HTML or JSON depending on the request
-
Is there a good cross-platform (Windows / Linux) C or C++ library for file I/O?
And documentation in most cases is more user-friendly if you will use something like MkDocs(based on Markdown), example http://rapidjson.org/
- What is the best way to store multiple objects of a class as data in C++?
-
How to deserialise json into a C++ struct?
Use RapidJSON https://rapidjson.org/
-
DAW JSON Link v3, a JSON serialization/deserialization library, is released
It seems not super widely used compared to other famous libraries like RapidJSON, nlohmann-json, or simdjson. But it seems the author is very active in developing this project which can mitigate this "lack of community" issue.
-
Is cpp a good language for reading and writing large quantities of JSON files as quickly as possible?
have a look at rapidjson for a a nice simple json framework https://rapidjson.org/ I use it and it's quite fast and as good as anything I used in python.
-
What JSON library do you suggest?
rapidjson is header only and does the trick for me most of the time.
So I just cloned https://github.com/Tencent/rapidjson to see what is the current status. At compile time they check if the C++ compiler supports the "noexcept" keyword, and if so they define RAPIDJSON_NOEXCEPT to be "noexcept". Throughout the implementation, RAPIDJSON_NOEXCEPT is added to quite a few function declarations (about a hundred of them).
Thank you for your response. In reply to the first issue you raise, note that Tencent gives the following guidance: "Generally speaking, RapidJSON should be exception-safe (enough) to replace RAPIDJSON_ASSERT by an exception." If some of those functions are now noexcept, that would be... unfortunate. Especially if this is the kind of noexcept that gets randomly slapped on functions nowadays "because we can", rather than "because we must".
- Storing data to be used in simulations.
What are some alternatives?
JsonCpp - A C++ library for interacting with JSON.
json - JSON for Modern C++
simdjson - Parsing gigabytes of JSON per second : used by Facebook/Meta Velox, the Node.js runtime, ClickHouse, WatermelonDB, Apache Doris, Milvus, StarRocks
cJSON - Ultralightweight JSON parser in ANSI C
Boost.PropertyTree - Boost.org property_tree module
Jansson - C library for encoding, decoding and manipulating JSON data
ujson
ArduinoJson - 📟 JSON library for Arduino and embedded C++. Simple and efficient.
qt-json - A simple class for parsing JSON data into a QVariant hierarchy and vice versa.
PicoJSON - a header-file-only, JSON parser serializer in C++
yaml-cpp - A YAML parser and emitter in C++
json11