On Tue, Oct 22, 2019 at 3:13 PM Daniel Frey via Boost
That sounds like you should stop using the STL altogether. What if std::string is suddenly 2x slower? So... no, I don't buy that argument.
I just switched our JSON library https://github.com/taocpp/json from our own classic enum+union implementation (back from the C++11 days) over to std::variant (as we are now C++17 anyways).
Any idea why taocpp compiled with optimizations is 5 to 10 times slower than the other libraries at parsing the same inputs? Boost.JSON parse 55952763 bytes in 234ms Boost.JSON parse 55952763 bytes in 232ms Boost.JSON parse 55952763 bytes in 231ms rapidjson parse 55952763 bytes in 239ms rapidjson parse 55952763 bytes in 240ms rapidjson parse 55952763 bytes in 239ms nlohmann parse 55952763 bytes in 495ms nlohmann parse 55952763 bytes in 491ms nlohmann parse 55952763 bytes in 494ms tao-json parse 55952763 bytes in 2178ms tao-json parse 55952763 bytes in 2069ms tao-json parse 55952763 bytes in 2056ms Boost.JSON parse 488889121 bytes in 1820ms Boost.JSON parse 488889121 bytes in 1831ms Boost.JSON parse 488889121 bytes in 1835ms rapidjson parse 488889121 bytes in 1860ms rapidjson parse 488889121 bytes in 1886ms rapidjson parse 488889121 bytes in 1828ms nlohmann parse 488889121 bytes in 4195ms nlohmann parse 488889121 bytes in 4241ms nlohmann parse 488889121 bytes in 4320ms tao-json parse 488889121 bytes in 22952ms tao-json parse 488889121 bytes in 23265ms tao-json parse 488889121 bytes in 23117ms Here's a profile of an optimized build calling just tao-json for parsing: https://i.imgur.com/I7QLPkn.png It seems like there's this thing called PEGTL which has some large number of functions showing up as taking up time in the profile? What is PEGTL? Thanks