Closed Bug 1860807 Opened 2 years ago Closed 1 year ago

Optimize i31ref constant creation

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: rhunt, Assigned: jpages)

References

Details

Attachments

(1 file)

The canonical way of creating a constant i31ref value for GC languages is the sequence of:

(i31.new (i32.const X))

Today we will load the i32 constant into a register than compute the i31ref value from it using some arithmetic. We could optimize this so that we perform the i31ref conversion at compile-time and just load the result as a constant at runtime.

Assignee: nobody → jpages
Pushed by jpages@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0f93c847582 wasm: Optimize i31ref creation with constants. r=rhunt.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: