mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-13 09:50:36 +00:00
LibJS: Avoid pointless HashTable copying during GC mark phase
for_each_cell_among_possible_pointers() was taking HashTable by value instead of by const reference for no reason. The copying was soaking up ~4% of CPU time while loading https://x.com/
This commit is contained in:
parent
56f0b10d14
commit
9220c68408
Notes:
sideshowbarker
2024-07-17 06:51:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9220c68408 Pull-request: https://github.com/SerenityOS/serenity/pull/21087
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ static void add_possible_value(HashMap<FlatPtr, HeapRootTypeOrLocation>& possibl
|
|||
}
|
||||
|
||||
template<typename Callback>
|
||||
static void for_each_cell_among_possible_pointers(HashTable<HeapBlock*> all_live_heap_blocks, HashMap<FlatPtr, HeapRootTypeOrLocation>& possible_pointers, Callback callback)
|
||||
static void for_each_cell_among_possible_pointers(HashTable<HeapBlock*> const& all_live_heap_blocks, HashMap<FlatPtr, HeapRootTypeOrLocation>& possible_pointers, Callback callback)
|
||||
{
|
||||
for (auto possible_pointer : possible_pointers.keys()) {
|
||||
if (!possible_pointer)
|
||||
|
|
Loading…
Reference in a new issue