Open
Bug 818750
Opened 13 years ago
Updated 1 year ago
IonMonkey: each OutOfLineTruncate is 448 bytes, can we factor this out into per-IonRuntime stub?
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
NEW
People
(Reporter: luke, Unassigned)
References
(Blocks 1 open bug)
Details
The out-of-line double->int conversion path costs .5K for each and every double->int conversion. From a quick look, it seems like nothing in the out-of-line path is particularly specialized to the individual site except the jump back. Can we factor this out into a stub (stored in IonRuntime)? This could quickly add up for large programs.
It could be refactored to be a very lightweight call, but we'd lose specialization of the output register. Maybe other things we can try: (1) using bailouts instead of having the js::ToInt32 call, (2) moving only the ToInt32 part to a shared stub, or (3) replacing the logic with something much simpler.
| Reporter | ||
Comment 2•13 years ago
|
||
It seems like, in the out-of-line path, there are two paths: one that tries to handle barely-out-of-range doubles and the fallback that calls out to C++. The former doesn't cost many instructions, so perhaps we can keep that inline in the out-of-line path?
Yeah, if I'm reading that right, it would be (2) above.
| Reporter | ||
Comment 4•13 years ago
|
||
Agreed
| Reporter | ||
Comment 5•13 years ago
|
||
I just measured and WMW generates 144KB of code in visitOutOfLineTruncateSlow (out of 11.8MB total) and Citadel generates 405KB (out of 25MB total), so 1.22% and 1.62%, resp. Not a huge deal, I suppose.
| Assignee | ||
Updated•12 years ago
|
Assignee: general → nobody
Updated•4 years ago
|
Severity: normal → S3
Updated•1 year ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•