render-with-notepad icon indicating copy to clipboard operation
render-with-notepad copied to clipboard

FindPattern performance

Open pravic opened this issue 4 years ago • 1 comments

Currently it uses memcmp for each address, however, it's more effective to find the first byte of a pattern via memchr (which is highly optimized) first and then compare the found address against the whole pattern.

pravic avatar May 20 '20 17:05 pravic

Thanks for the tip! I don't think I've ever come across memchr before, it looks really handy.

khalladay avatar May 23 '20 14:05 khalladay