3 ms·
The first example is incomplete: it forgets to clear and then check errno and/or check the returned value to +-HUGE_VAL! That'd probably slow down the strtod ve
by SAI_Peregrinus 6y ago
The first example is incomplete: it forgets to clear and then check errno and/or check the returned value to +-HUGE_VAL! That'd probably slow down the strtod version a bit more.
- jwilk 6y agostrtod() could also return 0 on underflow. But to be fair, the C++17 example doesn't check for underflow or overflow either.