Repository navigation
Reland debug impl for fieldless enums with concatenated string without using discriminant_value - #162535
Reland debug impl for fieldless enums with concatenated string without using discriminant_value#162535panstromek wants to merge 23 commits into
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reland debug impl for fieldless enums with concatenated string without using discriminant_value
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (6ff0c29): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.8%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 1.0%, secondary 5.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 4.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 481.923s -> 481.101s (-0.17%) |
|
Replacing |
This comment has been minimized.
This comment has been minimized.
b82923b to
6c15429
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reland debug impl for fieldless enums with concatenated string without using discriminant_value
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 499edf9 failed: CI. Failed jobs:
|
This comment has been minimized.
This comment has been minimized.
|
@bors try |
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reland debug impl for fieldless enums with concatenated string without using discriminant_value
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (e694fed): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @bors rollup=iffy rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.5%, secondary 4.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.9%, secondary -1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.3%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 487.044s -> 491.679s (0.95%) |
|
@bors try @rust-timer queue priority=-5 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reland debug impl for fieldless enums with concatenated string without using discriminant_value
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (c609802): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @bors rollup=iffy rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.2%, secondary 4.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.1%, secondary 5.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.1%, secondary 0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 488.311s -> 487.884s (-0.09%) |
|
This doesn't look as good as the previous run, I think we can keep the threshold on 5 |
View all comments
relands #155452
reverts #162164
This implementation avoids the problem in the original PR by using simple match instead of indexing by
discriminant_value. This avoids the cost of many small strings, generates less MIR and reduces borrowck cost, but it doesn't avoid the match checking costs (obviously).It uses slightly different strategy to avoid more MIR costs - it doesn't generate array of indexes. It maps the enum variant directly to the start index. Names are separated by space, so the outlined function figures out the end index based on that.