3 ms·
The implementation buried inside RapidJSON[0] is also very fast. Pretty much any library for protocols that encode floats to decimal strings needs such an imple
by nly 6y ago
The implementation buried inside RapidJSON[0] is also very fast. Pretty much any library for protocols that encode floats to decimal strings needs such an implementation to be performance competitive.
Interestingly RapidJSON is one of the few JSON libraries for C++ that has a "full precision" mode. Most don't even do str->double conversions precisely.
[0] https://github.com/Tencent/rapidjson/blob/master/include/rapidjson/internal/strtod.h https://github.com/Tencent/rapidjson/blob/master/include/rap...