Closed woodruffw closed 5 years ago
Some thoughts:
Locally with pe-parse
, this results in about a 10% performance hit. pe-parse
is a special case, though: it doesn't have any non-system modules other than its own main module. As such, performance for more realistic targets will probably be even worse (but coverage will be better).
I originally suggested switching to std::set
, but I might have been wrong about that -- std::vector
will probably end up being faster due to locality of access, plus (maybe?) compiler optimizations for partial unrolling/autovectorizing. I'll have to do some testing to see what shakes out.
Edit: Apparently std::array
guarantees memory locality, while std::vector
is usually just local.
@woodruffw I made a slightly modified version that applies the blacklisting in on_module_load. Take a look and let me know what you think. Not sure by what factor, but I think that should improve performance a little bit.
Yeah, that looks good to me (and it'll probably be a good bit faster). I'll turn yours into a PR and close this out.
Fixes #333.