RESOLVED FIXED254960
Use fixed-size deadCells vector in MarkedBlock::sweep
https://bugs.webkit.org/show_bug.cgi?id=254960
Summary Use fixed-size deadCells vector in MarkedBlock::sweep
David Degazio
Reported 2023-04-03 17:36:48 PDT
rdar://107585451 In MarkedBlock::specializedSweep, we allocate a `Vector<uint64_t>` to store the list of dead cells we need to destroy. However, the maximum number of atoms in a MarkedBlock is bounded by a constant - currently 1024. This means we can do two things: - Because the maximum atom number is less than 65536, we can store them as `uint16_t`s to reduce memory usage/improve locality. - At only 1024 atoms per block, and since `specializedSweep` isn't recursive or anything, it's probably fine to allocate the full storage of the vector on the stack. This means we avoid allocation (both initially and to grow the vector), can use `Vector::uncheckedAppend`, and probably improve locality somewhat.
Attachments
David Degazio
Comment 1 2023-04-03 17:42:47 PDT
EWS
Comment 2 2023-04-04 23:45:35 PDT
Committed 262612@main (424d1996eedf): <https://commits.webkit.org/262612@main> Reviewed commits have been landed. Closing PR #12350 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.