8

Fix the `FileEncoder` buffer size. by nnethercote · Pull Request #111088 · rust-...

 1 year ago
source link: https://github.com/rust-lang/rust/pull/111088
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Contributor

It allows a variable size, but in practice we always use the default of 8192 bytes. This commit fixes it to that size, which makes things slightly faster because the size can be hard-wired in generated code.

The commit also:

  • Rearranges some buffer capacity checks so they're all in the same form (x > BUFSIZE).
  • Removes some buffer capacity assertions and comments about them. With an 8192 byte buffer, we're not in any danger of overflowing a usize.

r? @WaffleLapkin

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

May 2, 2023

Contributor

Author

This was a small (sub-1%) but widespread win for me locally, let's see what happens on CI.

@bors try @rust-timer queue

This comment has been minimized.

rustbot

added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

May 2, 2023

Contributor

hourglass Trying commit 09b380f with merge e959c1c...

Contributor

sunny Try build successful - checks-actions
Build commit: e959c1c (e959c1c6134125cb2710dad9da572e29dca474ab)

This comment has been minimized.

Collaborator

Finished benchmarking commit (e959c1c): comparison URL.

Overall result: white_check_mark 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 x
(primary)
- - 0
Regressions x
(secondary)
- - 0
Improvements white_check_mark
(primary)
-0.2% [-0.3%, -0.2%] 13
Improvements white_check_mark
(secondary)
-0.4% [-0.7%, -0.2%] 7
All xwhite_check_mark (primary) -0.2% [-0.3%, -0.2%] 13

Max RSS (memory usage)

Results

Cycles

Results

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 655.55s -> 655.596s (0.01%)

rustbot

removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

May 2, 2023

Contributor

Author

@bors r=WaffleLapkin

Contributor

pushpin Commit 8556960 has been approved by WaffleLapkin

It is now in the queue for this repository.

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

May 3, 2023

Contributor

hourglass Testing commit 8556960 with merge 83c5a15...

Contributor

broken_heart Test failed - checks-actions

bors

added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

May 5, 2023

This comment has been minimized.

Member

@bors retry

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

May 5, 2023

Contributor

lock Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?Error message

bors

removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label

May 5, 2023

bors

added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label

May 5, 2023

Contributor

umbrella The latest upstream changes (presumably #111231) made this pull request unmergeable. Please resolve the merge conflicts.

Contributor

Author

I rebased.

@bors r=WaffleLapkin

Contributor

pushpin Commit f2df861 has been approved by WaffleLapkin

It is now in the queue for this repository.

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

labels

May 15, 2023

Contributor

hourglass Testing commit f2df861 with merge 8006510ab0f69ee75e9c3f7e8bff3776886dae51...

Contributor

sunny Test successful - checks-actions
Approved by: WaffleLapkin
Pushing 8006510 to master...

bors

added the merged-by-bors This PR was explicitly merged by bors label

May 15, 2023

bors

merged commit 8006510 into

rust-lang:master

May 15, 2023

12 checks passed

Collaborator

Finished benchmarking commit (8006510): comparison URL.

Overall result: xwhite_check_mark regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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 x
(primary)
- - 0
Regressions x
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements white_check_mark
(primary)
-0.3% [-0.5%, -0.3%] 10
Improvements white_check_mark
(secondary)
-0.4% [-0.7%, -0.2%] 12
All xwhite_check_mark (primary) -0.3% [-0.5%, -0.3%] 10

Max RSS (memory usage)

Results

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 640.795s -> 641.463s (0.10%)

rustbot

added the perf-regression Performance regressions label

May 15, 2023

Member

This is a win overall, and the one regression looks like a return to steady-state after a noisy improvement in the preceding PR #108273 (comment)

@rustbot label: +perf-regression-triaged

rustbot

added the perf-regression-triaged The performance regression has been triaged. label

May 15, 2023

nnethercote

deleted the fix-FileEncoder-buf-size branch

May 15, 2023 22:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

WaffleLapkin

WaffleLapkin approved these changes
Labels
merged-by-bors This PR was explicitly merged by bors perf-regression Performance regressions perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects

None yet

Milestone

1.71.0

Development

Successfully merging this pull request may close these issues.

None yet

7 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK