Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use BMH for memmem #312

Open
radare opened this issue Mar 7, 2017 · 9 comments
Open

Use BMH for memmem #312

radare opened this issue Mar 7, 2017 · 9 comments

Comments

@radare
Copy link

radare commented Mar 7, 2017

https://github.com/xerub/ibex64/blob/27f8cd2e185a883e6fd74df722e5ca643dccdd63/lib/memmem.c

@radare
Copy link
Author

radare commented Mar 7, 2017

@radare
Copy link
Author

radare commented Mar 7, 2017

this will speedup r_str_str too http://old.blog.phusion.nl/2010/12/06/efficient-substring-searching/

@radare
Copy link
Author

radare commented Mar 7, 2017

@alvarofe
Copy link

alvarofe commented Mar 7, 2017

If the algorithm is better +1 for my side.

@radare
Copy link
Author

radare commented Mar 9, 2017

i think this will speedup RCons and SDB

@Maijin
Copy link

Maijin commented Mar 11, 2017

Check it's already partially used here - https://github.com/radare/radare2/blob/master/libr/search/search.c#L8

@MaskRay
Copy link

MaskRay commented Aug 12, 2017

I try to bring back part of Boyer-Moore-Horspool at radareorg/radare2#8195 .

libr/core/cmd_search.c:static void do_string_search(RCore *core, struct search_parameters *param) {

the blocks are sent to the string matching algorithm by chunks of blocksize (defaults to 256). This harms performance.
Searching for needles cross the block boundary is tricky.

@radare
Copy link
Author

radare commented Jan 27, 2018

the blocksize can be changed by the user. im aware thats a performance issue if the user does a wrong choice

@stale
Copy link

stale bot commented Jun 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. Considering a lot has changed since its creation, we kindly ask you to check again if the issue you reported is still relevant in the current version of radare2. If it is, update this issue with a comment, otherwise it will be automatically closed if no further activity occurs. Thank you for your contributions.

@ret2libc ret2libc transferred this issue from radareorg/radare2 Jul 16, 2020
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

No branches or pull requests

4 participants