mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +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
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…
Add table
Add a link
Reference in a new issue