50 ms·
> several formatters that are often pretty large (e.g. f32 and f64 would add at least 30 KB of binary …) I know floats are full of scary corner cases, but… Ass
by owl57 3y ago
> several formatters that are often pretty large (e.g. f32 and f64 would add at least 30 KB of binary …)
I know floats are full of scary corner cases, but… Assuming tens of bytes per an if statement, hundreds of corner cases just in formatting? Is it really that bad?
- lifthrasiir 3y agoA naive implementation would be small, but a correct implementation (with some concrete definition of "correct") will need a sizable data table. I know this because I wrote that part of code [1] and somehow it is still in the std even though other algorithms now exist [2]. [1] https://github.com/rust-lang/rust/pull/24612 https://github.com/rust-lang/rust/pull/24612 [2] https://github.com/rust-lang/rust/issues/52811 https://github.com/rust-lang/rust/issues/52811