Telling your number parser what to expect
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
fast_float, a fast number-parsing library used in GCC's C++ standard library, is adding performance hints that let callers tell the parser what their data looks like. Hints for unpredictable signs, short numbers, and round-to-nearest mode remove costly branch mispredictions.