Closed Bug 1828603 Opened 2 years ago Closed 2 years ago

Optimise MovableCellHasher::match method by checking pointers for equality first

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(1 file)

This is an easy win. We don't need to look up any unique IDs here when passed two equal pointers. This should be the case most of the time.

Doing this improves the weakmap lookup benchmark time from 75.3 ns to 66.9 ns locally, a reduction of 11.2%.

If the key and lookup pointers are the same we don't need to check the unique
ID.

Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8edefba923f6 Optimize match method to check pointer equality first r=jandem
Whiteboard: [sp3]
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: