PP: Implement locale-independent strtod, using istringstream and a fast path.
Fixes #1228. Fixes #234.
This uses imbue() to be locale independent. Notes:
- 'sstream >> double' is much slower than strtod()
* this was measurable in the test suite as a whole, despite being
a tiny fraction of what the test suite does
- so, this embeds a fast path that bypasses sstream most of the time
=> the test suite is faster than before
- sstream is probably slower, because it does more accurate rounding than strtod()
- sstream does not create INFINITY by itself, this was done based on failure inferencing
Showing
glslang/MachineIndependent/preprocessor/PpContext.cpp
100644 → 100755
glslang/MachineIndependent/preprocessor/PpScanner.cpp
100644 → 100755
Please
register
or
sign in
to comment