Skip to content

Experiment - Interners per TyKind - #165136

Closed
Jamesbarford wants to merge 3 commits into
rust-lang:mainfrom
Jamesbarford:experiment/intern-type-kind
Closed

Jamesbarford wants to merge 3 commits into
rust-lang:mainfrom
Jamesbarford:experiment/intern-type-kind

Conversation

@Jamesbarford

@Jamesbarford Jamesbarford commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Foray into seeing if having an interned set per TypeKind is a good idea.

This is an experiment to see if the idea is worth pursuing. I have used Codex with 6.1 to generate all of the code. I am not putting this up for human review in it's present state and should not be seen as reflective of anything more than a prototype

r? ghost

@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 Oct 29, 2026
@Jamesbarford

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 Oct 29, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
…try>

Experiment - Interners per `TyKind`
@rust-bors

rust-bors Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 3ece7c9 (3ece7c92ed2628bb854854c5975ef06c52aebcb6)
Base parent: 96a18bf (96a18bf5ffa2b24f9cf3d1c731a9eb121c1acad9)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (3ece7c9): 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.9% [0.9%, 0.9%] 1
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
-0.4% [-0.9%, -0.1%] 90
Improvements ✅
(secondary)
-0.6% [-2.8%, -0.0%] 123
All ❌✅ (primary) -0.4% [-0.9%, 0.9%] 91

Max RSS (memory usage)

Results (primary -2.9%, secondary 1.3%)

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)
6.0% [1.2%, 10.3%] 11
Improvements ✅
(primary)
-2.9% [-3.3%, -2.6%] 3
Improvements ✅
(secondary)
-2.7% [-4.6%, -1.5%] 13
All ❌✅ (primary) -2.9% [-3.3%, -2.6%] 3

Cycles

Results (primary -4.2%, secondary -1.7%)

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)
4.3% [2.7%, 6.2%] 4
Improvements ✅
(primary)
-4.2% [-4.3%, -4.1%] 2
Improvements ✅
(secondary)
-3.2% [-8.0%, -2.1%] 15
All ❌✅ (primary) -4.2% [-4.3%, -4.1%] 2

Binary size

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

Bootstrap: 487.353s -> 486.755s (-0.12%)
Artifact size: 406.68 MiB -> 407.04 MiB (0.09%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 29, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Jamesbarford
Jamesbarford force-pushed the experiment/intern-type-kind branch from 488a88e to ebff0b8 Compare October 30, 2026 13:51
@rust-log-analyzer

This comment has been minimized.

@Jamesbarford
Jamesbarford force-pushed the experiment/intern-type-kind branch from ebff0b8 to d7dcffe Compare November 2, 2026 07:07
@rust-log-analyzer

This comment has been minimized.

@Jamesbarford
Jamesbarford force-pushed the experiment/intern-type-kind branch from d7dcffe to 9e85ac0 Compare November 2, 2026 08:58
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Jamesbarford
Jamesbarford force-pushed the experiment/intern-type-kind branch from 9e85ac0 to 1fed6aa Compare November 2, 2026 10:59
@Jamesbarford

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 Nov 2, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 2, 2026
…try>

Experiment - Interners per `TyKind`
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 956b4b1 (956b4b18b7c010a869e3fab9ead670175d3362a6)
Base parent: 4c46afa (4c46afa63688fb473618f9b3553d70b0c15a88eb)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (956b4b1): 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
Regressions ❌
(secondary)
0.3% [0.1%, 0.5%] 15
Improvements ✅
(primary)
-0.4% [-0.7%, -0.2%] 69
Improvements ✅
(secondary)
-0.6% [-2.3%, -0.0%] 70
All ❌✅ (primary) -0.4% [-0.7%, -0.2%] 69

Max RSS (memory usage)

Results (primary 2.3%, secondary 1.3%)

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

mean range count
Regressions ❌
(primary)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
4.9% [2.2%, 8.4%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.6% [-9.7%, -2.0%] 6
All ❌✅ (primary) 2.3% [2.3%, 2.3%] 1

Cycles

Results (primary -1.4%, secondary -2.7%)

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

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
5.4% [4.8%, 6.1%] 2
Improvements ✅
(primary)
-2.5% [-3.2%, -2.1%] 3
Improvements ✅
(secondary)
-4.3% [-6.1%, -2.7%] 10
All ❌✅ (primary) -1.4% [-3.2%, 2.1%] 4

Binary size

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

Bootstrap: 488.585s -> 481.594s (-1.43%)
Artifact size: 406.53 MiB -> 406.72 MiB (0.05%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 2, 2026
@Jamesbarford

Copy link
Copy Markdown
Contributor Author

... This has proved to me it is worth exploring. Closing and going to implement properly

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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