Skip to content

Partially revert "Use drop_guard in some places in {core,alloc,std}" - #162067

Open
GrigorenkoPV wants to merge 1 commit into
rust-lang:mainfrom
GrigorenkoPV:undrop-unguard
Open

Partially revert "Use drop_guard in some places in {core,alloc,std}"#162067
GrigorenkoPV wants to merge 1 commit into
rust-lang:mainfrom
GrigorenkoPV:undrop-unguard

Conversation

@GrigorenkoPV

@GrigorenkoPV GrigorenkoPV commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

This partially reverts #161702, because there was a perf regression.

This only reverts the places where there was an #[inline] on fn drop before. (See #161702 (review) for context.)

This probably deserves a perf run to see if the regression is fixed

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 31, 2026
@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 12 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, clarfonthey, joboet, nia-e

@lqd

lqd commented Aug 31, 2026

Copy link
Copy Markdown
Member

@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 Aug 31, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 31, 2026
Partially revert "Use `drop_guard` in some places in {core,alloc,std}"
@clarfonthey

Copy link
Copy Markdown
Contributor

r? clarfonthey since I reviewed the other change

@rustbot rustbot assigned clarfonthey and unassigned JohnTitor Aug 31, 2026
@rust-bors

rust-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a10c6b9 (a10c6b9b9aa59048793025cf9178b5e3e9b71a24)
Base parent: 45f215f (45f215f136e00d8a74c69afde2f71be3f16837cf)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a10c6b9): 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.3%, 1.5%] 2
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
-0.5% [-1.6%, -0.2%] 25
Improvements ✅
(secondary)
-0.5% [-1.8%, -0.2%] 23
All ❌✅ (primary) -0.4% [-1.6%, 1.5%] 27

Max RSS (memory usage)

Results (primary -0.5%, secondary 1.6%)

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

mean range count
Regressions ❌
(primary)
3.1% [2.8%, 3.4%] 2
Regressions ❌
(secondary)
3.2% [2.1%, 5.2%] 3
Improvements ✅
(primary)
-7.6% [-7.6%, -7.6%] 1
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) -0.5% [-7.6%, 3.4%] 3

Cycles

Results (secondary -5.6%)

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.6% [-11.5%, -2.4%] 11
All ❌✅ (primary) - - 0

Binary size

Results (primary -1.1%, secondary -1.6%)

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

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
0.7% [0.7%, 0.7%] 1
Improvements ✅
(primary)
-1.1% [-12.8%, -0.2%] 56
Improvements ✅
(secondary)
-1.7% [-12.8%, -0.5%] 22
All ❌✅ (primary) -1.1% [-12.8%, 2.0%] 57

Bootstrap: 475.395s -> 475.011s (-0.08%)
Artifact size: 401.38 MiB -> 402.63 MiB (0.31%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 31, 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-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants