Skip to content

Specialize dropless arena for common alignment#159515

Draft
Zoxc wants to merge 2 commits into
rust-lang:mainfrom
Zoxc:spec-align-arena
Draft

Specialize dropless arena for common alignment#159515
Zoxc wants to merge 2 commits into
rust-lang:mainfrom
Zoxc:spec-align-arena

Conversation

@Zoxc

@Zoxc Zoxc commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

This adds a dropless arena (AlignedDroplessArena) which is specialized for a specific alignment and AlignedDroplessArenas which dispatches to an appropriate arena based on the required alignment. This saves instructions for alignment and memory for padding, with the drawback of more active arenas.

This PR is LLM written.

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

Zoxc commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Local benchmarks:

BenchmarkBeforeAfterBeforeAfterBeforeAfter
TimeTime%Physical MemoryPhysical Memory%Committed MemoryCommitted Memory%
🟣 clap:check1.3760s1.3628s -0.96%150.90 MiB150.80 MiB -0.07%197.79 MiB198.06 MiB 0.14%
🟣 hyper:check0.2528s0.2534s 0.24%80.71 MiB80.70 MiB -0.01%128.66 MiB128.77 MiB 0.09%
🟣 regex:check0.7874s0.7837s -0.47%113.43 MiB113.53 MiB 0.09%156.50 MiB156.81 MiB 0.20%
🟣 syn:check1.3187s1.3124s -0.48%144.15 MiB144.33 MiB 0.13%186.56 MiB187.12 MiB 0.30%
Total3.7350s3.7123s -0.61%489.19 MiB489.36 MiB 0.04%669.51 MiB670.76 MiB 0.19%
Summary1.0000s0.9958s -0.42%1 byte1.00 bytes 0.04%1 byte1.00 bytes 0.18%

@rust-log-analyzer

This comment has been minimized.

@Zoxc

Zoxc commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 18, 2026
Specialize dropless arena for common alignment
@rust-bors

rust-bors Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: e63fa69 (e63fa6952cf86b7a54e2bbe26d894851adeb716b)
Base parent: 8a3308e (8a3308ed506be56b8157dfc9242a145153331296)

@Zoxc

Zoxc commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

@rust-timer build e63fa69

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (e63fa69): 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)
0.3% [0.3%, 0.3%] 2
Regressions ❌
(secondary)
0.7% [0.2%, 1.0%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 8
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 2

Max RSS (memory usage)

Results (secondary -0.1%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.0% [1.9%, 7.0%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.4% [-4.9%, -2.0%] 12
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 485.656s -> 484.454s (-0.25%)
Artifact size: 390.03 MiB -> 390.08 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 19, 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-compiler Relevant to the compiler 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