Closed Bug 1841620 Opened 11 months ago Closed 10 months ago

Improve inlined nursery allocation path

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

(Whiteboard: [sp3])

Attachments

(4 files)

This bug is for improvements that follow on from the work in bug 1838629.

This removes two conditional branches per inlined allocation from the generated
code as best I can make out.

We don't need to load the size from an array if we have it available at compile
time, like we do for strings and big ints.

Attached file Some perf numbers

This is a clear win for wasm-gc struct/array allocations. +1 to land.

Not related to this bug (and doesn't make any difference to the generated
code), but the next patch requires IsObjectAllocKind to be constexpr.

Depends on D182723

Attachment #9342240 - Attachment description: Bug 1841620 - Part 2: Pass size parameter to AllocNurseryOrTenuredCell where possible r?sfink → Bug 1841620 - Part 3: Avoid loading thing size at runtime where possible r?sfink
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/73e84f16c18d
Part 1: Teach the compiler that successful nursery allocation cannot result in a nullptr r=sfink
https://hg.mozilla.org/integration/autoland/rev/7eba8591b7e7
Part 2: Make AllocKind functions constexpr where possible r=sfink
https://hg.mozilla.org/integration/autoland/rev/53a47bf7757c
Part 3: Avoid loading thing size at runtime where possible r=sfink
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: