coreutils/tests
Michael Debertol 4bbbe3a3f2
sort: implement numeric string comparison (#2070)
* 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
2021-04-17 13:49:35 +02:00
..
by-util sort: implement numeric string comparison (#2070) 2021-04-17 13:49:35 +02:00
common Merge pull request #2054 from rethab/improve-cksum-test 2021-04-17 00:49:17 +02:00
fixtures sort: implement numeric string comparison (#2070) 2021-04-17 13:49:35 +02:00
tests.rs tests ~ use build.rs build list of test_UTIL module files 2020-06-02 12:17:30 -05:00