-
- Notifications
You must be signed in to change notification settings - Fork 14.2k
Revert #148937 #150096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Revert #148937 #150096
+366 −63
Conversation
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
…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. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-SGX Target: SGX O-windows Operating system: Windows 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.
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.