r/cpp • MSVC STL Dev • Oct 11 '19

CppCon CppCon 2019: Stephan T. Lavavej - Floating-Point <charconv>: Making Your Code 10x Faster With C++17's Final Boss

https://www.youtube.com/watch?v=4P_kbF0EbZM
257 Upvotes

69 comments sorted by

View all comments

Show parent comments

13

u/STL MSVC STL Dev Oct 12 '19

sprintf could be reimplemented with Ryu Printf, with adjustments for the runtime rounding mode and locale sensitive decimal points, if the CRT were willing to pay the lookup table size cost.

iostreams is a performance dumpster fire, no argument there. Hence C++20 format.

-3

u/alfps Oct 12 '19

iostreams is a performance dumpster fire, no argument there. Hence C++20 format

I.e. the C++14 and earlier standard library design had certain speed bumps standing in the way of a speed demo, so you chose C++20 format.

C++17 to_chars could also have worked for such demo, but not all current compilers implement it for floating point, and with format people can start using it right now, hence…

Anyway good work. As of five years ago or so I'm no longer baffled why the user communities for This and That often react so extremely negatively to mention of This and That problems. In my experience it's so in all aspects of life, not just the C++ community or the technical, and I believe it has nothing to do with being uninformed, even though those who react so emotionally often clearly are, but just all to do with herd instinct, maybe protecting the flock.