3 ms·
Formatting is much faster than before, but still terribly slow compared to simply rounding numbers using math and floor and ceiling appropriately. Ryu is more
by ChrisLomont 7y ago
Formatting is much faster than before, but still terribly slow compared to simply rounding numbers using math and floor and ceiling appropriately.
Ryu is more than 100x slower than something like
rval = floor(100*val+0.5)/100.0
(which is not quite right due to numerical issues, but close, and illustrates the idea).
Formatting, to get a rounded float, is terribly slow.