Closed
Bug 897425
Opened 11 years ago
Closed 5 years ago
Odinmonkey: consider hoisting the heap base pointer
Categories
(Core :: JavaScript: WebAssembly, defect)
Core
JavaScript: WebAssembly
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: dougc, Unassigned)
References
(Blocks 1 open bug)
Details
The x86 currently uses an immediate constant for the heap base, and the x64 and ARM dedicate a register. All heap access is currently relative to this heap base, taking advantage of instruction encoding support, but at the same time limiting the use of a range of instruction encodings for use by code. It might be more efficient to hoist the heap base out of loops and add it to a pointer used within the loop. For example see bug 895127. Bounds checking and emulation of JS out-of-bounds array access might frustrate such attempts. But perhaps there are some common patterns that could be handled by splitting the loop into sub-loops that deal with the different paths. The use of high bit masking for safe heap access might also frustrate such attempts. Aligning the heap base to the same alignment as the heap size might help.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Reporter | ||
Comment 1•9 years ago
|
||
There was another bug similar to this with some discussion ??. Hoisting the HeapBase+index started looking like more trouble than it was worth because the HeapBase needed to be subtracted back from this hoisted value when used in other ways and this could be common in a loop. It might work for some loops but it's rather fragile and probably a good deal of work to get it to work adequately. Buffer-at-zero started looking much more attractive and avoids the need to do this optimization, and there are wip patches for x64 and ARM which could at least show best performance gain that the optimization in this bug might achieve.
Comment 2•9 years ago
|
||
(In reply to Douglas Crosher [:dougc] from comment #1) > There was another bug similar to this with some discussion ??. bug 984478
Comment 3•6 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Updated•6 years ago
|
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
Updated•5 years ago
|
Component: JavaScript Engine → Javascript: WebAssembly
Comment 4•5 years ago
|
||
Closing, bug 984478 mentions similar ideas, and I seem to recall that experimentation with letting the heap register in the hands of register allocation has been done and not proven fruitful.
Status: REOPENED → RESOLVED
Closed: 6 years ago → 5 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•