Repository navigation
Reduce multi-stream block size from 64 bytes to 16 bytes in ExtendWithPclmul. - #2226
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_995282703
branch
7 times, most recently
from
October 22, 2026 19:20
406ee9d to
607cdb0
Compare
…hPclmul. Change the per-stream block granularity in `ExtendWithPclmul` from 64 bytes to 16 bytes when `copy_type == CopyType::kNone` so that fewer trailing bytes fall through to the slow single-stream scalar loop. After the 64-byte main loop (`bs / 4` iterations), handle the remaining 32-byte (`bs & 2`) and 16-byte (`bs & 1`) per-stream blocks in non-copy mode using `ProcessAllStreams16`, rotating the 4 partial CRCs per PCLMUL stream so they remain ordered from oldest to newest before final reduction. Re-tune the stream counts, since it's now less expensive to have a larger number of them. Also, move the computation of the magic constant to before the main loop, so that it's latency is off the critical path. PiperOrigin-RevId: 1004984384
copybara-service
Bot
force-pushed
the
test_995282703
branch
from
October 22, 2026 19:51
607cdb0 to
0abf9f7
Compare
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.
Reduce multi-stream block size from 64 bytes to 16 bytes in ExtendWithPclmul.
Change the per-stream block granularity in
ExtendWithPclmulfrom 64 bytes to16 bytes when
copy_type == CopyType::kNoneso that fewer trailing bytes fallthrough to the slow single-stream scalar loop.
After the 64-byte main loop (
bs / 4iterations), handle the remaining 32-byte(
bs & 2) and 16-byte (bs & 1) per-stream blocks in non-copy mode usingProcessAllStreams16, rotating the 4 partial CRCs per PCLMUL stream so theyremain ordered from oldest to newest before final reduction.
Re-tune the stream counts, since it's now less expensive to have a larger number of them.
Also, move the computation of the magic constant to before the main loop, so that it's latency is off the critical path.