Skip to content

Add CPython based bloom filter when doing str.strip() - #694

Open
kc611 wants to merge 2 commits into
spylang:mainfrom
kc611:kc/str_bloom_filter
Open

kc611 wants to merge 2 commits into
spylang:mainfrom
kc611:kc/str_bloom_filter

Conversation

@kc611

@kc611 kc611 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Follow-up from #670 (See: #670 (review))

This PR intends to add a CPython like bloom filter in order to outright reject a string when the given character is not present in the original string.

CPython implementations at:

https://github.com/python/cpython/blob/1f25c333a280561e86cc0af69af307b53ddbaaac/Objects/unicodeobject.c#L12675-L12684

https://github.com/python/cpython/blob/main/Objects/unicodeobject.c#L891

@kc611
kc611 force-pushed the kc/str_bloom_filter branch from d5403dd to bb5e987 Compare September 11, 2026 11:49
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.

1 participant