Skip to content

Specialize advance_by method of Fuse - #160342

Open
a1phyr wants to merge 1 commit into
rust-lang:mainfrom
a1phyr:fuse_advnce_by
Open

Specialize advance_by method of Fuse#160342
a1phyr wants to merge 1 commit into
rust-lang:mainfrom
a1phyr:fuse_advnce_by

Conversation

@a1phyr

@a1phyr a1phyr commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

advance_by is used a lot internally so it seems important to specialize it.

@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 1, 2026
@rustbot

rustbot commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

r? @jhpratt

rustbot has assigned @jhpratt.
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 8 candidates

@joboet joboet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one nit to pick. Apart from that, r=me

View changes since this review

Comment thread library/core/src/iter/adapters/fuse.rs Outdated
@joboet joboet assigned joboet and unassigned jhpratt Aug 1, 2026
@joboet

joboet commented Aug 1, 2026

Copy link
Copy Markdown
Member

Thanks! Let's just wait for CI to come back green...

@bors delegate+

@rust-bors

rust-bors Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

✌️ @a1phyr, you can now approve this pull request!

If @joboet told you to "r=me" after making some further change, then please make that change and post @bors r=joboet.

View changes since this delegation.

@asquared31415

Copy link
Copy Markdown
Contributor

Since the intent of this PR is optimization of a frequently used function, would it be a good idea to do a perf run on it, to ensure that the optimization actually helps and that this isn't somehow accidentally regressing? It'll probably be a wash because I don't actually think that the compiler uses Fuse at all.

@a1phyr

a1phyr commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Yes, I don't think that it would change anything for the compiler.

@bors r=joboet

@rust-bors

rust-bors Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7d0aafd has been approved by joboet

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Aug 1, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 1, 2026
Specialize `advance_by` method of `Fuse`

`advance_by` is used a lot internally so it seems important to specialize it.
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 1, 2026
Specialize `advance_by` method of `Fuse`

`advance_by` is used a lot internally so it seems important to specialize it.
rust-bors Bot pushed a commit that referenced this pull request Aug 2, 2026
Rollup of 6 pull requests

Successful merges:

 - #159844 (Subtree cg_gcc sync (2026-07-24))
 - #156527 (Move `std::io` tests to `alloctests` & add prelude)
 - #159525 (Stabilize passing 128-bit integers via vector registers with `asm!` on x86)
 - #160342 (Specialize `advance_by` method of `Fuse`)
 - #106643 (Allow only implementing `Read::read_buf`)
 - #159729 (allocations are allowed to grow (but not shrink))
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 2, 2026
Specialize `advance_by` method of `Fuse`

`advance_by` is used a lot internally so it seems important to specialize it.
rust-bors Bot pushed a commit that referenced this pull request Aug 2, 2026
Rollup of 6 pull requests

Successful merges:

 - #156527 (Move `std::io` tests to `alloctests` & add prelude)
 - #159525 (Stabilize passing 128-bit integers via vector registers with `asm!` on x86)
 - #160342 (Specialize `advance_by` method of `Fuse`)
 - #106643 (Allow only implementing `Read::read_buf`)
 - #159729 (allocations are allowed to grow (but not shrink))
 - #159881 (fix: Do not stop `visible_parent_map` breadth-first search reaching children of `#[doc(hidden)]` modules)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 2, 2026
Specialize `advance_by` method of `Fuse`

`advance_by` is used a lot internally so it seems important to specialize it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants