7

Reduce BitSet size used in `Borrows` dataflow analysis by vlad20012 · Pull Reque...

 1 year ago
source link: https://github.com/rust-lang/rust/pull/111396
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

Member

It looks like it is not needed to multiply the number of borrows by 2. Bits greater than self.borrow_set.len() are never set in this bitset. This should decrease the memory usage by an epsilon.

Collaborator

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

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 9, 2023

Contributor

vlad20012 reacted with laugh emoji

This comment has been minimized.

rustbot

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

May 9, 2023

Contributor

hourglass Trying commit 6989246 with merge 5ea3d7f...

Member

Author

I traced it up to a849da6 (#49836). The multiplication by 2 should have been removed in that commit.

Btw I don't expect any measurable performance/memory improvements since the BitSet should usually be small. It's rather just a cleanup.

Contributor

sunny Try build successful - checks-actions
Build commit: 5ea3d7f (5ea3d7fdc513e2d1c07b0fe05cef5c2fe684447f)

This comment has been minimized.

Collaborator

Finished benchmarking commit (5ea3d7f): comparison URL.

Overall result: x regressions - 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.4% [0.3%, 0.5%] 2
Improvements white_check_mark
(primary)
- - 0
Improvements white_check_mark
(secondary)
- - 0
All xwhite_check_mark (primary) - - 0

Max RSS (memory usage)

Results

Cycles

Results

Binary size

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

Bootstrap: 657.767s -> 658.566s (0.12%)

rustbot

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

May 10, 2023

Contributor

Thanks!
@bors r+

Contributor

pushpin Commit 6989246 has been approved by cjgillot

It is now in the queue for this repository.

Contributor

evergreen_tree The tree is currently closed for pull requests below priority 50. This pull request will be tested once the tree is reopened.

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 10, 2023

Contributor

hourglass Testing commit 6989246 with merge 192f3950f0dbfb69647978011f930673c8fcfdda...

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 11, 2023

Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

Contributor

@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 11, 2023

Contributor

hourglass Testing commit 6989246 with merge 4a59ba4...

Contributor

sunny Test successful - checks-actions
Approved by: cjgillot
Pushing 4a59ba4 to master...

vlad20012 reacted with hooray emoji

bors

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

May 12, 2023

bors

merged commit 4a59ba4 into

rust-lang:master

May 12, 2023

12 checks passed

Collaborator

Finished benchmarking commit (4a59ba4): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results

Cycles

Results

Binary size

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

Bootstrap: 659.596s -> 659.191s (-0.06%)

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

Reviewers

No reviews

Assignees

cjgillot

Labels
merged-by-bors This PR was explicitly merged by bors 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