Repository navigation
Several small span improvements - #163587
Conversation
Limit changes: - Increase `MAX_CTXT`: it is currently `0b0111_1111_1111_1110` (~15 bits). But it only needs to be distinguishable from `CTXT_INTERNED_MARKER` (all 1s). So we can increase it to `0b1111_1111_1111_1110` (~16 bits). The old limit is rarely reached; the `uom` crate is an exception (it has 39k contexts) and we see a 1-2% instruction count reduction when building it. (This value was incorrectly reduced from ~16 bits to ~15 bits in e525e4f by me; apologies!) Renamings: - Rename `MAX_CTXT` as `MAX_CTXT_OR_PARENT` because it also relates to the parent field. - Remove the `BASE_` prefix from `BASE_LEN_INTERNED_MARKER` because it doesn't mean anything. Comments: - Update parts of the comment that predate the addition of the `parent` field, such as the frequency measurements. (In incremental builds, 20-40% internment due to non-root context and non-zero parent is common.) - Slightly clarify the meanings of the fields in the different forms, and add a paragraph quickly explaining which specific values distinguish the four forms.
|
Not expecting this to affect any of the benchmarks in rustc-perf, but let's check: @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.
Several small span improvements
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (d8d8cda): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never 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 (secondary -3.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 6.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 490.746s -> 497.016s (1.28%) |
|
Not sure why the tiny tt-muncher regressions occur; the only code change in this PR is the changing of that one constant. The cachegrind diff says the difference is mostly in |
|
@bors r+ rollup |
…s, r=petrochenkov Several small span improvements Limit changes: - Increase `MAX_CTXT`: it is currently `0b0111_1111_1111_1110` (~15 bits). But it only needs to be distinguishable from `CTXT_INTERNED_MARKER` (all 1s). So we can increase it to `0b1111_1111_1111_1110` (~16 bits). The old limit is rarely reached; the `uom` crate is an exception (it has 39k contexts) and we see a 1-2% instruction count reduction when building it. (This value was incorrectly reduced from ~16 bits to ~15 bits in e525e4f by me; apologies!) Renamings: - Rename `MAX_CTXT` as `MAX_CTXT_OR_PARENT` because it also relates to the parent field. - Remove the `BASE_` prefix from `BASE_LEN_INTERNED_MARKER` because it doesn't mean anything. Comments: - Update parts of the comment that predate the addition of the `parent` field, such as the frequency measurements. (In incremental builds, 20-40% internment due to non-root context and non-zero parent is common.) - Slightly clarify the meanings of the fields in the different forms, and add a paragraph quickly explaining which specific values distinguish the four forms. r? @petrochenkov
…uwer Rollup of 13 pull requests Successful merges: - #163317 (Fix incremental compilation for fat LTO) - #163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs") - #151793 (Add mul_add_relaxed methods for floating-point types) - #162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors) - #163010 (Miri can do dirfd now) - #163535 (Improve `DocStrings` perf) - #163576 (Fix `TypeOutlives` fast-path) - #163587 (Several small span improvements) - #163612 (fix `ValidateBoundVars`) - #163632 (bump rustc-build-sysroot) - #163635 (Revert note about signum of NaN) - #163644 (Add mailmap entry) - #163651 (Remove variants from `feature-gate-autodiff-use` test)
…uwer Rollup of 14 pull requests Successful merges: - #163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs") - #151793 (Add mul_add_relaxed methods for floating-point types) - #162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors) - #163010 (Miri can do dirfd now) - #163535 (Improve `DocStrings` perf) - #163576 (Fix `TypeOutlives` fast-path) - #163587 (Several small span improvements) - #163603 (Reorganise reflection intrinsics) - #163612 (fix `ValidateBoundVars`) - #163632 (bump rustc-build-sysroot) - #163635 (Revert note about signum of NaN) - #163644 (Add mailmap entry) - #163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`) - #163651 (Remove variants from `feature-gate-autodiff-use` test)
Rollup merge of #163587 - nnethercote:small-span-improvements, r=petrochenkov Several small span improvements Limit changes: - Increase `MAX_CTXT`: it is currently `0b0111_1111_1111_1110` (~15 bits). But it only needs to be distinguishable from `CTXT_INTERNED_MARKER` (all 1s). So we can increase it to `0b1111_1111_1111_1110` (~16 bits). The old limit is rarely reached; the `uom` crate is an exception (it has 39k contexts) and we see a 1-2% instruction count reduction when building it. (This value was incorrectly reduced from ~16 bits to ~15 bits in e525e4f by me; apologies!) Renamings: - Rename `MAX_CTXT` as `MAX_CTXT_OR_PARENT` because it also relates to the parent field. - Remove the `BASE_` prefix from `BASE_LEN_INTERNED_MARKER` because it doesn't mean anything. Comments: - Update parts of the comment that predate the addition of the `parent` field, such as the frequency measurements. (In incremental builds, 20-40% internment due to non-root context and non-zero parent is common.) - Slightly clarify the meanings of the fields in the different forms, and add a paragraph quickly explaining which specific values distinguish the four forms. r? @petrochenkov
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (04c3c2a): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +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)This perf run didn't have relevant results for this metric. CyclesResults (secondary -3.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: missing data |
|
The typenum regression might be real or it might not be, it's hard to tell through the noise |
…uwer Rollup of 14 pull requests Successful merges: - rust-lang/rust#163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs") - rust-lang/rust#151793 (Add mul_add_relaxed methods for floating-point types) - rust-lang/rust#162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors) - rust-lang/rust#163010 (Miri can do dirfd now) - rust-lang/rust#163535 (Improve `DocStrings` perf) - rust-lang/rust#163576 (Fix `TypeOutlives` fast-path) - rust-lang/rust#163587 (Several small span improvements) - rust-lang/rust#163603 (Reorganise reflection intrinsics) - rust-lang/rust#163612 (fix `ValidateBoundVars`) - rust-lang/rust#163632 (bump rustc-build-sysroot) - rust-lang/rust#163635 (Revert note about signum of NaN) - rust-lang/rust#163644 (Add mailmap entry) - rust-lang/rust#163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`) - rust-lang/rust#163651 (Remove variants from `feature-gate-autodiff-use` test)
|
As above, the tiny perf effects are just random codegen fluctuations. |
…uwer Rollup of 14 pull requests Successful merges: - rust-lang/rust#163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs") - rust-lang/rust#151793 (Add mul_add_relaxed methods for floating-point types) - rust-lang/rust#162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors) - rust-lang/rust#163010 (Miri can do dirfd now) - rust-lang/rust#163535 (Improve `DocStrings` perf) - rust-lang/rust#163576 (Fix `TypeOutlives` fast-path) - rust-lang/rust#163587 (Several small span improvements) - rust-lang/rust#163603 (Reorganise reflection intrinsics) - rust-lang/rust#163612 (fix `ValidateBoundVars`) - rust-lang/rust#163632 (bump rustc-build-sysroot) - rust-lang/rust#163635 (Revert note about signum of NaN) - rust-lang/rust#163644 (Add mailmap entry) - rust-lang/rust#163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`) - rust-lang/rust#163651 (Remove variants from `feature-gate-autodiff-use` test)
…uwer Rollup of 14 pull requests Successful merges: - rust-lang/rust#163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs") - rust-lang/rust#151793 (Add mul_add_relaxed methods for floating-point types) - rust-lang/rust#162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors) - rust-lang/rust#163010 (Miri can do dirfd now) - rust-lang/rust#163535 (Improve `DocStrings` perf) - rust-lang/rust#163576 (Fix `TypeOutlives` fast-path) - rust-lang/rust#163587 (Several small span improvements) - rust-lang/rust#163603 (Reorganise reflection intrinsics) - rust-lang/rust#163612 (fix `ValidateBoundVars`) - rust-lang/rust#163632 (bump rustc-build-sysroot) - rust-lang/rust#163635 (Revert note about signum of NaN) - rust-lang/rust#163644 (Add mailmap entry) - rust-lang/rust#163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`) - rust-lang/rust#163651 (Remove variants from `feature-gate-autodiff-use` test)
…uwer Rollup of 14 pull requests Successful merges: - rust-lang/rust#163582 (Reapply "bootstrap: Enable rustdoc mergeable CCI for std and internal docs") - rust-lang/rust#151793 (Add mul_add_relaxed methods for floating-point types) - rust-lang/rust#162782 (Fix rustdoc ICE caused by mishandling of ambiguity errors) - rust-lang/rust#163010 (Miri can do dirfd now) - rust-lang/rust#163535 (Improve `DocStrings` perf) - rust-lang/rust#163576 (Fix `TypeOutlives` fast-path) - rust-lang/rust#163587 (Several small span improvements) - rust-lang/rust#163603 (Reorganise reflection intrinsics) - rust-lang/rust#163612 (fix `ValidateBoundVars`) - rust-lang/rust#163632 (bump rustc-build-sysroot) - rust-lang/rust#163635 (Revert note about signum of NaN) - rust-lang/rust#163644 (Add mailmap entry) - rust-lang/rust#163647 (Rename `rustc_driver::run_compiler` to `compiler_entrypoint`) - rust-lang/rust#163651 (Remove variants from `feature-gate-autodiff-use` test)
Limit changes:
MAX_CTXT: it is currently0b0111_1111_1111_1110(~15 bits). But it only needs to be distinguishable fromCTXT_INTERNED_MARKER(all 1s). So we can increase it to0b1111_1111_1111_1110(~16 bits). The old limit is rarely reached; theuomcrate is an exception (it has 39k contexts) and we see a 1-2% instruction count reduction when building it. (This value was incorrectly reduced from ~16 bits to ~15 bits in e525e4f by me; apologies!)Renamings:
MAX_CTXTasMAX_CTXT_OR_PARENTbecause it also relates to the parent field.BASE_prefix fromBASE_LEN_INTERNED_MARKERbecause it doesn't mean anything.Comments:
parentfield, such as the frequency measurements. (In incremental builds, 20-40% internment due to non-root context and non-zero parent is common.)r? @petrochenkov