Last Comment Bug 730525 - IonMonkey: Inline js_Array (new Array) constructor calls.
: IonMonkey: Inline js_Array (new Array) constructor calls.
: perf
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Linux
-- normal (vote)
: ---
Assigned To: general
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: IonSpeed
  Show dependency treegraph
Reported: 2012-02-24 18:33 PST by Nicolas B. Pierron [:nbp]
Modified: 2012-07-27 17:07 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

/home/mrosenberg/patches/inline_js_Array-r0.patch (2.80 KB, patch)
2012-03-17 01:19 PDT, Marty Rosenberg [:mjrosenb]
nicolas.b.pierron: review+
Details | Diff | Splinter Review

Description User image Nicolas B. Pierron [:nbp] 2012-02-24 18:33:34 PST
See MCallOptimize.cpp and JM implementation for details of possible implementations.
Comment 1 User image Marty Rosenberg [:mjrosenb] 2012-03-17 01:19:24 PDT
Created attachment 606844 [details] [diff] [review]

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
Comment 2 User image Nicolas B. Pierron [:nbp] 2012-03-17 15:09:44 PDT
Comment on attachment 606844 [details] [diff] [review]

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.
Comment 3 User image Marty Rosenberg [:mjrosenb] 2012-03-18 12:16:28 PDT
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.
Comment 4 User image Nicolas B. Pierron [:nbp] 2012-07-27 17:07:33 PDT
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)

Note You need to log in before you can comment on or make changes to this bug.