diff options
| author | WeiN76LQh <WeiN76LQh@github.com> | 2024-11-26 16:15:58 +0000 |
|---|---|---|
| committer | kat <kat@vector35.com> | 2025-02-10 10:33:20 -0500 |
| commit | 28aef35c76c4b6c9215aeb82f974032031154bd1 (patch) | |
| tree | 1c724b45f14428c1e9ea72c70ea93702c14a83e2 /python/basedetection.py | |
| parent | e90a08f5a6237472a3d0caf77e11dfcc987f1169 (diff) | |
[SharedCache] Improve the types for `m_exportInfos`
This commit changes 2 things;
1. `m_exportInfos` is now a map where its values are also a map rather than a vector of pairs. The reason for this is that `SharedCache::FindSymbolAtAddrAndApplyToAddr` is a hot path which does by far the most accesses to `m_exportInfos`. In that function it must find the correct symbol for a given address so a map lookup will be much quicker than iterating a vector. The other use cases of `m_exportInfos` would prefer a vector but they are executed very infrequently.
2. The symbols are stored in `m_exportInfos` as references to the `Symbol` type. This makes more sense because otherwise there is a lot of time spent converting to and from a `Symbol` type and a pair of `BNSymbolType` + a `std::string`.
Diffstat (limited to 'python/basedetection.py')
0 files changed, 0 insertions, 0 deletions
