Skip to content

[EXPERIMENT] Fewer ast boxes#159284

Draft
nnethercote wants to merge 3 commits into
rust-lang:mainfrom
nnethercote:fewer-ast-boxes
Draft

[EXPERIMENT] Fewer ast boxes#159284
nnethercote wants to merge 3 commits into
rust-lang:mainfrom
nnethercote:fewer-ast-boxes

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

No description provided.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Jul 14, 2026
@nnethercote

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 14, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 14, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_ty_utils v0.0.0 (/checkout/compiler/rustc_ty_utils)
error[E0308]: mismatched types
    --> compiler/rustc_parse/src/parser/tests.rs:2229:5
     |
2227 |   ) -> PResult<'_, Option<Box<ast::Item>>> {
     |        ----------------------------------- expected `Result<Option<std::boxed::Box<rustc_ast::Item>>, Diag<'_>>` because of return type
2228 |       // njn: ?
2229 | /     unwrap_or_emit_fatal(new_parser_from_source_str(psess, name, source, StripTokens::Nothing))
2230 | |         .parse_item(ForceCollect::No, AllowConstBlockItems::Yes)
     | |________________________________________________________________^ expected `Result<Option<Box<Item>>, Diag<'_>>`, found `Result<Option<Item>, Diag<'_>>`
     |
     = note: expected enum `Result<Option<std::boxed::Box<Item>>, Diag<'_>>`
                found enum `Result<Option<Item>, Diag<'_>>`

error[E0308]: mismatched types
    --> compiler/rustc_parse/src/parser/tests.rs:2246:5
     |
2244 |   fn string_to_item(source_str: String) -> Option<Box<ast::Item>> {
     |                                            ---------------------- expected `Option<std::boxed::Box<rustc_ast::Item>>` because of return type
2245 |       // njn: ?
2246 | /     with_error_checking_parse(source_str, &ParseSess::new(), |p| {
2247 | |         p.parse_item(ForceCollect::No, AllowConstBlockItems::Yes)
2248 | |     })
     | |______^ expected `Option<Box<Item>>`, found `Option<Item>`
     |
     = note: expected enum `Option<std::boxed::Box<Item>>`
                found enum `Option<Item>`

[RUSTC-TIMING] rustc_ty_utils test:true 2.909

@rust-bors

rust-bors Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: bab0c1e (bab0c1eb7e75290cf95b2efb244fc6c05c6aace4)
Base parent: da80ed0 (da80ed0708a09dc096c184345d6eb42cbcd50a1e)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (bab0c1e): 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 @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.0% [0.2%, 1.6%] 15
Regressions ❌
(secondary)
0.9% [0.2%, 1.3%] 13
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 1
Improvements ✅
(secondary)
-0.6% [-1.6%, -0.2%] 21
All ❌✅ (primary) 0.9% [-0.3%, 1.6%] 16

Max RSS (memory usage)

Results (primary 1.0%, secondary 4.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.0% [0.5%, 1.6%] 25
Regressions ❌
(secondary)
4.4% [0.6%, 11.4%] 17
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.0% [0.5%, 1.6%] 25

Cycles

Results (primary 2.5%, secondary 2.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.5% [2.1%, 2.8%] 3
Regressions ❌
(secondary)
4.2% [2.4%, 8.2%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-3.5%, -2.5%] 2
All ❌✅ (primary) 2.5% [2.1%, 2.8%] 3

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 491.202s -> 489.983s (-0.25%)
Artifact size: 389.32 MiB -> 389.40 MiB (0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants