Skip to content

Use a larger length/offset for rmeta tables #113172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Jun 29, 2023

A potential fix for #112934
#113542 is a much better implementation

r? @ghost

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 29, 2023
@saethlin
Copy link
Member 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 Jun 29, 2023
@bors
Copy link
Collaborator

bors commented Jun 29, 2023

⌛ Trying commit eb908cebfdcc3098b2107cb7cbf4b9168232a52f with merge b75185b7c3847331e3a074a6d6ac4fb8d14e7835...

@bors
Copy link
Collaborator

bors commented Jun 29, 2023

☀️ Try build successful - checks-actions
Build commit: b75185b7c3847331e3a074a6d6ac4fb8d14e7835 (b75185b7c3847331e3a074a6d6ac4fb8d14e7835)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b75185b7c3847331e3a074a6d6ac4fb8d14e7835): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.5% [-1.5%, -1.5%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.6% [1.2%, 6.9%] 189
Regressions ❌
(secondary)
3.5% [0.9%, 5.7%] 115
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.5% [-0.5%, 6.9%] 190

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.6%, -0.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-0.6%, 0.5%] 2

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
12.3% [0.9%, 31.6%] 129
Regressions ❌
(secondary)
13.2% [0.0%, 43.8%] 84
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 12.3% [0.9%, 31.6%] 129

Bootstrap: 660.993s -> 662.494s (0.23%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 30, 2023
@saethlin
Copy link
Member Author

saethlin commented Jul 1, 2023

It looks like the size of rlibs grows between 1% and 30%. That seems a bit steep. Based on the fact that icount/cycles/time are perf-neutral I'm going to try to do some varint encoding.

@saethlin saethlin changed the title Use u64 lengths for rmeta tables Use a larger length/offset for rmeta tables Jul 1, 2023
@saethlin
Copy link
Member Author

saethlin commented Jul 1, 2023

Of course, varint encoding isn't possible because this is a table format. So instead of a varint encoding, let's try just bumping up number of bytes we encode. 5 bytes should be enough for a while.

@saethlin
Copy link
Member Author

saethlin commented Jul 1, 2023

@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 1, 2023
@bors
Copy link
Collaborator

bors commented Jul 1, 2023

⌛ Trying commit 6bb51e7 with merge 905eceaa29971ec6f56586b96233d97fb49b37d8...

@bors
Copy link
Collaborator

bors commented Jul 1, 2023

☀️ Try build successful - checks-actions
Build commit: 905eceaa29971ec6f56586b96233d97fb49b37d8 (905eceaa29971ec6f56586b96233d97fb49b37d8)

1 similar comment
@bors
Copy link
Collaborator

bors commented Jul 1, 2023

☀️ Try build successful - checks-actions
Build commit: 905eceaa29971ec6f56586b96233d97fb49b37d8 (905eceaa29971ec6f56586b96233d97fb49b37d8)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (905eceaa29971ec6f56586b96233d97fb49b37d8): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.4% [0.4%, 0.5%] 5
Regressions ❌
(secondary)
1.1% [1.0%, 1.1%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) 0.4% [0.4%, 0.5%] 5

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.2% [0.5%, 8.6%] 27
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
-1.5% [-1.9%, -1.1%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [-1.9%, 8.6%] 29

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.0% [0.5%, 2.1%] 3
Regressions ❌
(secondary)
3.0% [2.1%, 3.7%] 4
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [-0.4%, 2.1%] 4

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.2% [0.2%, 7.9%] 125
Regressions ❌
(secondary)
3.7% [0.1%, 10.9%] 75
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.2% [0.2%, 7.9%] 125

Bootstrap: 661.654s -> 660.885s (-0.12%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 1, 2023
@saethlin
Copy link
Member Author

saethlin commented Jul 1, 2023

That looks a lot more acceptable to me. We still have some regressions, which is inevitable given the fact that this changing the size of the elements of a table, but they are less.

Now I think we just need a regression test.

@Kobzol
Copy link
Contributor

Kobzol commented Jul 1, 2023

Here are the metadata regressions.

@saethlin
Copy link
Member Author

Closing in favor of #113542

@saethlin saethlin closed this Jul 14, 2023
@saethlin saethlin deleted the u64-index branch August 30, 2023 21:37
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-review Status: Awaiting review from the assignee but also interested parties. 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.

5 participants