mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:17:44 +00:00
LibELF: Use binary search when looking up symbols :^)
For whatever reason, symbolication was doing an O(n) walk of all the symbols, despite having sorted them beforehand. Changing this to a binary_search() makes symbolication noticeably faster and improves Profiler startup time.
This commit is contained in:
parent
ef09f9c825
commit
b31602367e
2 changed files with 49 additions and 56 deletions
|
@ -216,6 +216,9 @@ private:
|
|||
Optional<Image::Symbol> symbol;
|
||||
};
|
||||
|
||||
void sort_symbols() const;
|
||||
SortedSymbol* find_sorted_symbol(FlatPtr) const;
|
||||
|
||||
mutable Vector<SortedSymbol> m_sorted_symbols;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue