Closed Bug 1579661 Opened 5 years ago Closed 5 years ago

js/src/wasm/cranelift/src/bindings/mod.rs: FuncTypeWithId::args: use SmallVec rather than Vec

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: jseward, Assigned: jseward)

Details

Attachments

(1 file)

FuncTypeWithId::args returns a Vec<ir::Type>, most of which are pretty small. Replacing it with a SmallVec::<[ir::Type; 4]> reduces the number of allocation (calls) for compiling wasm via CL by about 2.3% and does not increase the instruction count.

FuncTypeWithId::args returns a Vec<ir::Type>, most of which are pretty
small. Replacing it with a SmallVec::<[ir::Type; 4]> reduces the number of
allocation (calls) for compiling wasm via CL by about 2.3% and does not
increase the instruction count.

OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Assignee: nobody → jseward
Pushed by jseward@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/faeb5ef49f86 js/src/wasm/cranelift/src/bindings/mod.rs: FuncTypeWithId::args: use SmallVec rather than Vec. r=bbouvier.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: