[PR #1144] [MERGED] Compare 4 bytes when checking if a longer match is possible. #1703

Open
opened 2026-01-29 20:55:24 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/google/brotli/pull/1144
Author: @copybara-service[bot]
Created: 3/17/2024
Status: Merged
Merged: 3/20/2024
Merged by: @undefined

Base: masterHead: test_616445442


📝 Commits (1)

  • 9351fa7 Compare 4 bytes when checking if a longer match is possible.

📊 Changes

5 files changed (+34 additions, -6 deletions)

View changed files

📝 c/enc/hash.h (+9 -3)
📝 c/enc/hash_forgetful_chain_inc.h (+8 -1)
📝 c/enc/hash_longest_match64_inc.h (+8 -1)
📝 c/enc/hash_longest_match_inc.h (+8 -1)
📝 c/enc/hash_longest_match_quickly_inc.h (+1 -0)

📄 Description

Compare 4 bytes when checking if a longer match is possible.

Loading and comparing 4 bytes is ~as fast as 1 byte, but allows us to avoid more full match length calculation.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/google/brotli/pull/1144 **Author:** [@copybara-service[bot]](https://github.com/apps/copybara-service) **Created:** 3/17/2024 **Status:** ✅ Merged **Merged:** 3/20/2024 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `test_616445442` --- ### 📝 Commits (1) - [`9351fa7`](https://github.com/google/brotli/commit/9351fa7ffb9d5aa133dc8f8b14e175cace52d9e4) Compare 4 bytes when checking if a longer match is possible. ### 📊 Changes **5 files changed** (+34 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `c/enc/hash.h` (+9 -3) 📝 `c/enc/hash_forgetful_chain_inc.h` (+8 -1) 📝 `c/enc/hash_longest_match64_inc.h` (+8 -1) 📝 `c/enc/hash_longest_match_inc.h` (+8 -1) 📝 `c/enc/hash_longest_match_quickly_inc.h` (+1 -0) </details> ### 📄 Description Compare 4 bytes when checking if a longer match is possible. Loading and comparing 4 bytes is ~as fast as 1 byte, but allows us to avoid more full match length calculation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 20:55:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#1703