Skip to content

use memchr::memmem for much faster search#39

Merged
merces merged 1 commit intomentebinaria:mainfrom
yeggor:fix/search
Feb 18, 2026
Merged

use memchr::memmem for much faster search#39
merces merged 1 commit intomentebinaria:mainfrom
yeggor:fix/search

Conversation

@yeggor
Copy link
Contributor

@yeggor yeggor commented Feb 18, 2026

Initial approach via .windows(siz) is too slow on huge files. I am replacing it with memchr::memmem::find for much faster search.

For example, searching for the last 16 bytes in a 28 GB file used to take a very long time. After the update, this process now takes less than one second.

initial approach via .windows(siz) is too slow on huge files
@merces
Copy link
Member

merces commented Feb 18, 2026

This is great. Thank you!

@merces merces merged commit b6fe920 into mentebinaria:main Feb 18, 2026
6 checks passed
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