Repository navigation
feat: search improvements - #71
Conversation
|
Very nice! just out of curiosity, can you share how it compares in terms of the numbers you mentioned on the other MR:
|
|
I'm glad you asked because I forgot to consider kernel caching when running previous tests with it. =/ I've tested again and realized it's not much faster than yara-x, but still achieves the same performance without the burden of longer compilation times and binary size. Search methodologyI've added this code surrounding the call to let before = Instant::now();
// search()
eprintln!("Search took {:.2?}", before.elapsed());Then ran dz6 using this command to drop the kernel cache: Search pattern: Results
I'm not sure we can get any faster than this. I tried to search for Ideas for the future: could we spawn two threads, each one searching over half the file? Just something that came to mind. :) |
|
If kernel caching made a big difference then that indicates the search is to some degree bottlenecked by disk IO. If that is really the case, then it's not a given that multithreading would help. But the strange part is that your numbers say ~8s for ~4Gb, so roughly 500Mb/s, and ssd these days can do something like 3-5Gb/s so it's a bit odd to have it saturated at 500Mb/s Maybe there is something else going on. Im not very experienced with this kind of optimization, so just doing some napkin math :🙃 But I think it's a good idea to try the paralelization, some care is needed about finding matches in the boarder of where we split the file though |
|
I've dropped the support for |
me neither, but you raised an interesting point. I'll run more tests when I have time.
Thank you! |
See #70, but uses
regex::bytes(@glazari's idea).The translator is still basic. It supports
??only.