Conversation
...so that they consume an `IntoBytes` as their source. Since these methods are private, this does not yet increase expressivity for users, but nonetheless allows the compiler to better optimize existing callsites. For example, the `ref_from_prefix_dynamic_size` benchmark becomes branchless, shrinking from 14 to 9 instructions. The falible suffix-with-elems benchmarks shrink from 24 to 17 instructions for dynamic size, and 28 to 20 instructions for dynamic padding. Only `try_ref_from_prefix_dynamic_size` regresses, from 19 to 20 instructions. gherrit-pr-id: Gd1b460a8ec2e8aa8adf2e070c329d9f209c7c89c
jswrenn
force-pushed
the
Gd1b460a8ec2e8aa8adf2e070c329d9f209c7c89c
branch
from
September 22, 2026 16:44
c4d31ee to
714c822
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## Gfa0cb30780189c43bb84da57a9ade4d5a9754223 #3711 +/- ##
=============================================================================
+ Coverage 92.20% 92.51% +0.31%
=============================================================================
Files 20 20
Lines 6260 6362 +102
=============================================================================
+ Hits 5772 5886 +114
+ Misses 488 476 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
...so that they consume an
IntoBytesas their source. Since thesemethods are private, this does not yet increase expressivity for
users, but nonetheless allows the compiler to better optimize existing
callsites. For example, the
ref_from_prefix_dynamic_sizebenchmarkbecomes branchless, shrinking from 14 to 9 instructions. The falible
suffix-with-elems benchmarks shrink from 24 to 17 instructions for
dynamic size, and 28 to 20 instructions for dynamic padding. Only
try_ref_from_prefix_dynamic_sizeregresses, from 19 to 20 instructions.TryFromBytes::try_read_from*#3712(try_)ref_from_prefix_suffix#3711ReadOnly#3682Latest Update: v3 — Compare vs v2
📚 Full Patch History
Links show the diff between the row version and the column version.
⬇️ Download this PR
Branch
git fetch origin refs/heads/Gd1b460a8ec2e8aa8adf2e070c329d9f209c7c89c && git checkout -b pr-Gd1b460a8ec2e8aa8adf2e070c329d9f209c7c89c FETCH_HEADCheckout
git fetch origin refs/heads/Gd1b460a8ec2e8aa8adf2e070c329d9f209c7c89c && git checkout FETCH_HEADCherry Pick
git fetch origin refs/heads/Gd1b460a8ec2e8aa8adf2e070c329d9f209c7c89c && git cherry-pick FETCH_HEADPull
Stacked PRs enabled by GHerrit.