Closed Bug 730525 Opened 12 years ago Closed 12 years ago

IonMonkey: Inline js_Array (new Array) constructor calls.

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: nbp, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

Attachments

(1 file)

See MCallOptimize.cpp and JM implementation for details of possible implementations.
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)
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.
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
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.