IonMonkey: Inline js_Array (new Array) constructor calls.

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: nbp, Unassigned)

Tracking

(Blocks: 1 bug, {perf})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
See MCallOptimize.cpp and JM implementation for details of possible implementations.
Created attachment 606844 [details] [diff] [review]
/home/mrosenberg/patches/inline_js_Array-r0.patch

This only superficially inlines js_Array, by precomputing the value returned by
types::TypeScript::InitObject(cx, script, pc, JSProto_Array); when we JIT the code, and only in the instances where the only argument to |Array()| is a single compile time constant
Attachment #606844 - Flags: review?(nicolas.b.pierron)
(Reporter)

Comment 2

5 years ago
Comment on attachment 606844 [details] [diff] [review]
/home/mrosenberg/patches/inline_js_Array-r0.patch

Review of attachment 606844 [details] [diff] [review]:
-----------------------------------------------------------------

This is a good start, you can handle multiple arguments by using a loop which produces the same as jsop_initelem with all other arguments.
Attachment #606844 - Flags: review?(nicolas.b.pierron) → review+
landed: http://hg.mozilla.org/projects/ionmonkey/rev/b5b6e6aebb36
no noticeable improvement on awfy, I'll leave this bug open while implementing some other things.  I suspect as long as we need to make a vmcall to get a new chunk of memory, this will continue to be a bottleneck.
(Reporter)

Comment 4

5 years ago
The second part of this bug — which consists at handling multiple arguments — was handled in another bug and it is now landed in ionmonkey. (see Bug 773995)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.