Conversation
…owedBuf` and `BorrowedCursor`) This caused several performance regressions because of existing code which uses `Read::read` and therefore requires full buffer initialization. This is particularly a problem when the same buffer is re-used for multiple read calls since this means it needs to be fully re-initialized each time. There is still some benefit to landing the API changes, but we will have to add private APIs so that the existing infrastructure can track and avoid redundant initialization.
Collaborator
|
BorrowedBuf
Member
|
r? @ChrisDenton r=me when PR CI passes |
Member
|
@bors r+ |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 17, 2025
…sDenton Revert rust-lang#148937 rust-lang#148937: Remove initialized-bytes tracking from `BorrowedBuf` and `BorrowedCursor` This caused several performance regressions because of existing code which uses `Read::read` and therefore requires full buffer initialization. This is particularly a problem when the same buffer is re-used for multiple read calls since this means it needs to be fully re-initialized each time. There is still some benefit to landing the API changes, but we will have to add private APIs so that the existing infrastructure can track and avoid redundant initialization.
This was referenced Dec 17, 2025
bors
added a commit
that referenced
this pull request
Dec 17, 2025
Rollup of 4 pull requests Successful merges: - #149919 (Correctly encode doc attribute metadata) - #150051 (mir_build: Rename `TestCase` to `TestableCase`) - #150088 (miri: add `miri_spin_loop` to make `hint::spin_loop` work consistently) - #150096 (Revert #148937) r? `@ghost` `@rustbot` modify labels: rollup
Member
|
👍 for landing this. I'll work on an updated version that does |
rust-timer
added a commit
that referenced
this pull request
Dec 17, 2025
Rollup merge of #150096 - Amanieu:revert-borrowedbuf, r=ChrisDenton Revert #148937 #148937: Remove initialized-bytes tracking from `BorrowedBuf` and `BorrowedCursor` This caused several performance regressions because of existing code which uses `Read::read` and therefore requires full buffer initialization. This is particularly a problem when the same buffer is re-used for multiple read calls since this means it needs to be fully re-initialized each time. There is still some benefit to landing the API changes, but we will have to add private APIs so that the existing infrastructure can track and avoid redundant initialization.
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Dec 18, 2025
Rollup of 4 pull requests Successful merges: - rust-lang/rust#149919 (Correctly encode doc attribute metadata) - rust-lang/rust#150051 (mir_build: Rename `TestCase` to `TestableCase`) - rust-lang/rust#150088 (miri: add `miri_spin_loop` to make `hint::spin_loop` work consistently) - rust-lang/rust#150096 (Revert rust-lang/rust#148937) r? `@ghost` `@rustbot` modify labels: rollup
Contributor
|
This will probably need to be backported to beta. |
Member
|
Backport discussed in https://rust-lang.zulipchat.com/#narrow/channel/542373-t-libs.2Fbackports/topic/.23150096.3A.20beta-nominated/with/564787187 @rustbot label beta-approved |
Collaborator
|
Error: Unknown labels: beta-approved Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip. |
Member
|
@rustbot label beta-accepted |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#148937: Remove initialized-bytes tracking from
BorrowedBufandBorrowedCursorThis caused several performance regressions because of existing code which uses
Read::readand therefore requires full buffer initialization. This is particularly a problem when the same buffer is re-used for multiple read calls since this means it needs to be fully re-initialized each time.There is still some benefit to landing the API changes, but we will have to add private APIs so that the existing infrastructure can track and avoid redundant initialization.