Open
Bug 838115
Opened 13 years ago
Updated 3 years ago
IonMonkey: Make code generated for CallKnown leaner.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: h4writer, Unassigned)
References
(Blocks 1 open bug)
Details
In e-b we spend the most time in the functions rewrite_nboyer/one_way_unify1_nboyer. Accounts for 40% of total benchmark. Those are recursive functions that call themself a lot. All combined we spend 10% of our total time in the internals of CallKnown. Improving the speed of that particular lir will increase our score on e-b a lot.
| Reporter | ||
Comment 1•13 years ago
|
||
10% Total
------------------------------------------------------------------------------------
1) 2% Invoke path, because the usecount of scripts isn't high enough or reset by gc
2) 3% Load method + Load ioncode
3) 5% Remove IonFramePrefix + FreeStack
1) Will be solved by ggc, just like the 30% on raytrace. If we want an interim solution we could define a "hot" function. I.e. a function that was running in IM when gc'ing. Then we would run the function in interpreter and JM, untill the types are stable again and compile with IM sooner. I.e. reset the usecount, but mark it hot. And when a hot functions get an usecount of 1000 (arbitrary chosen now) bump the usecount to 10240 in order to compile it in IM.
2) By keeping the code->raw() pointer in IonScript we can use one load instead of two. That would bring this down to 0.5%
3) No idea
| Reporter | ||
Comment 2•13 years ago
|
||
For the record, Dave proposed/told me another approach to decrease the time spend in part (2). I'm not going to pursue that idea immediately, but writing it down, maybe it could be a potential route to have even faster CallKnown calls.
Currently we do:
|load JSScript| -> |load IonScript| -> |guard it exists and not compiling|disabled| -> |load IonCode| -> | load addresss entrypoint |
The idea was to put the address to the entrypoint in JSScript. That would point to a standard Invoke entry point address, that just invokes function in the interpreter. That way we only need to load the address of the entrypoint and start execution. Removing the need of Loading IonScript / Guarding / Loading IonCode. Whenever a function gets compiled, we only need to put the address in the JSScript and everything works.
| Reporter | ||
Comment 3•13 years ago
|
||
(In reply to Hannes Verschore [:h4writer] from comment #2)
> For the record, Dave proposed/told me another approach to decrease the time
> ...
Discussion about this is happening in bug 838830
| Assignee | ||
Updated•12 years ago
|
Assignee: general → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•