Closed Bug 1383828 Opened 7 years ago Closed 3 years ago

Branch prediction issues in code produced by MLoadElementFromState inside loops.

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED INVALID

People

(Reporter: nbp, Unassigned)

References

(Blocks 1 open bug)

Details

As documents under Bug 1364908 comment 21, Bug 1364908 comment 23, and Bug 1364908 comment 24.

MLoadElementFromState which produces a switch-case damage the ability of the branch predictor of the CPU to predict which branch is going to be taken.

We can solve this issue, either by using a stack-allocated array as the underlying representation for any State object used as argument of MLoadElementFromState, and/or by trying to unroll loops which have a MLoadElementFromState in their body, which which are using the length of this inlined-array as the loop boundary.
Blocks: sm-js-perf
Priority: -- → P3

Removed in bug 1686692.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.