mirror of
https://github.com/uutils/coreutils
synced 2024-11-17 02:08:09 +00:00
4bbbe3a3f2
* sort: implement numeric string comparison This implements -n and -h using a string comparison algorithm instead of parsing each number to a f64 and comparing those. This should result in a moderate performance increase and eliminate loss of precision. * cache parsed f64 numbers For general numeric comparisons we have to parse numbers as f64, as this behavior is explicitly documented by GNU coreutils. We can however cache the parsed value to speed up comparisons. * fix leading zeroes for negative numbers * use more appropriate name for exponent * improvements to the parse function * move checks into main loop and fix thousands separator condition * remove unneeded checks * rustfmt |
||
---|---|---|
.. | ||
by-util | ||
common | ||
fixtures | ||
tests.rs |