Closed Bug 1832044 Opened 2 years ago Closed 2 years ago

Allow weakmap lookup methods to be inlined

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(5 files)

Currently MovableCellHasher methods are implemented in Barrier.cpp. Apart from this WeakMap lookup methods could be totally inlined. Moving the hasher methods to a header file would allow inlining everything.

Assignee: nobody → jcoppeard

Using 'stable' in the name is more descriptive. And it's quicker to say and
easier to spell.

There's no need to expose this as generic functionality.

Depends on D177525

This moves the unqiue ID functionality out of Zone and into the new header
files StableCellHasher.h and StableCellHasher-inl.h.

Depends on D177526

Finally we can move these methods to StableCellHasher-inl.h and allow them to
be inlined.

Local testing shows this reduces the time taken by the weakmap benchark from
49.9 to 47.4 ns, a reduction of 5%.

Depends on D177527

Severity: -- → N/A
Type: task → enhancement
Priority: -- → P1

To counteract the effect on the instruction cache of inlining all this code we
can move some parts of allocation (which we don't expect to be as hot) out of
line.

Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b1451e959314 Part 1: Rename MovableCellHasher to StableCellHasher r=sfink https://hg.mozilla.org/integration/autoland/rev/3797a5e30e3d Part 2: Move hashing of unique IDs into the hasher r=sfink https://hg.mozilla.org/integration/autoland/rev/bebf205cc1f7 Part 3: Move stable hashing functionality to new header files r=sfink https://hg.mozilla.org/integration/autoland/rev/fa188b523ffc Part 4: Move StableCellHasher method definitions to header file r=sfink https://hg.mozilla.org/integration/autoland/rev/a8b602d1067a Part 5: Move some parts of allocation out of line r=sfink https://hg.mozilla.org/integration/autoland/rev/35d2b2ac19da apply code formatting via Lando
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: