Skip to content

Refactor Public Suffix List implementation to use a custom binary Trie.#8205

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_860652876
Open

Refactor Public Suffix List implementation to use a custom binary Trie.#8205
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_860652876

Conversation

@copybara-service
Copy link
Contributor

Refactor Public Suffix List implementation to use a custom binary Trie.

RELNOTES=Refactor Public Suffix List implementation to use a custom binary Trie for better memory efficiency.

@copybara-service copybara-service bot force-pushed the test_860652876 branch 2 times, most recently from 5f60268 to 786ae1a Compare February 11, 2026 00:39
RELNOTES=Refactor Public Suffix List implementation to use a custom binary Trie for better memory efficiency.
PiperOrigin-RevId: 860652876
@perceptron8
Copy link
Contributor

This might be a naive question, but couldn't the fact that all chunks in PublicSuffixPatterns.STRING_POOL are the same length be used to replace the binary search (in ChunksCharSequence#charAt) with a simple division? Even better, provided the chunk length is changed to a power of 2, a right bitwise shift could be used. Binary search feels like overkill. If the text contained surrogate pairs, such a solution wouldn't be an option, but I’ve checked and it seems there are no surrogate pairs in the pool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants