Conversation
|
GNU testsuite comparison: |
|
why not |
|
see comment at Cargo.toml |
|
Looking at rust-lang/rust#148670, it looks like the issue is due to stack spill on x86? if so can we use |
|
I cannot bench it. We should fix perf regression with cgu=1 for all targets instead. |
|
GNU testsuite comparison: |
|
I tried putting |
Unfortunately it doesn't appear to be possible to specify |
|
Also we can't have cgu=N workaround for |
We would likely need to manually outline cold code. |
|
coreutils/src/uu/expand/src/expand.rs Line 427 in 93ae934 Here: might be worth moving cold code into an inner |
|
I'm trying to go through these compiler flag changing PR's and my general take is that it is just a outcome driven decision where if we have measurements an benchmarks that show an improvement should always go for it, but if we don't have benchmarks its probably not the best use of time at the moment relative to other things to spend time on these flags because we are still changing a bunch of functionality. I'm seeing in a bunch of PR's now where code is changing in a function that has compiler hints and there's no easy way to tell whether they should stay or not since its not benchmarked. |
|
Also to outline cold code, we should should refactor error handling, for example: map_err_context(|| translate!("expand-error-failed-to-write-output"))should be: map_err_context(ExpandError::FailedToWriteOutput) |
|
This reduces binary size. |
what is binary size with |
|
16: 1211048 byte |
|
Performance with cgu=1 is important because #10863 (comment) |
|
GNU testsuite comparison: |
|
Its more of a question of where to focus the effort on, some of the fixes to reduce the need for a dependency especially for the locale stuff would probably have orders of magnitude more impact on binary sizes than working on compiler flags. The flag stuff is more fragile in the long run than the dependency stuff because things can change in the compiler and when we update rust where the fixes may no longer apply whereas the work on streamlining the dependency chain will be the same across versions. Just as an example, according the cargo bloat, only 2.6% of the release size is coming from uu_expand and the rest is coming from other dependencies. |
|
If someone found the code imprving both of readability and cgu1, is it OK for you? |
1349360 -> 1210472 byte. cgu=2 caused performance regression.#10863 (comment)