Nicolas Boichat

Results 115 comments of Nicolas Boichat

I should have made this a bit more clear, this is just the first step in many. > why do move it to uucore? it seems that it is only...

Added 2 commits, to make full use of the new formatting function in `seq`: - `uucore: format: Pad non-finite numbers with spaces, not zeros` this is something `seq` did right,...

`seq-main` is main branch, `./target/release/seq` is this branch. GNU coreutils is much faster in most cases, so mostly focusing on main vs this branch: 4% worse than main on integers:...

I could make `seq` 10% faster than main for integers by adding a bypass in the formatting code: ``` diff --git a/src/uucore/src/lib/features/format/num_format.rs b/src/uucore/src/lib/features/format/num_format.rs index 3a22fe0442f9..83543f14c863 100644 --- a/src/uucore/src/lib/features/format/num_format.rs +++ b/src/uucore/src/lib/features/format/num_format.rs...

For the second case, we can reduce the slowdown to 5% with a bypass in `write_output` when width == 0: ``` diff --git a/src/uucore/src/lib/features/format/num_format.rs b/src/uucore/src/lib/features/format/num_format.rs index 3a22fe0442f9..d8d60c8ba87f 100644 --- a/src/uucore/src/lib/features/format/num_format.rs...

Done, also filed #7482 for the most egregious performance gap. (also discovered that useful `hyperfine` syntax: `hyperfine -L seq seq,target/release/seq "{seq} 1000000"`)

Forgot to run fmt/clippy... and didn't properly run tests... Fixed now. Just for reference, benchmarks vs main: 25% better on integers, 5% slower on default floats: ``` $ taskset -c...

(I don't think those 2 failures are caused by this PR)

Just noticed that this PR regressed uppercase hexadecimal float printing, so I added a commit here to fix that: cd30627b04361732bb72e74e3e9506b9e0e61b1a , and add a test so that it doesn't happen...

`fts-sys` issue should be fixed upstream: need to wait for #7420.