Open Bug 1383364 Opened 7 years ago Updated 2 years ago

for..of significantly slower in certain testcases

Categories

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

defect

Tracking

()

Performance Impact low
Tracking Status
firefox57 --- wontfix

People

(Reporter: yfdyh000, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf, testcase)

For example:

https://jsperf.com/pk-for-of-vs-for-each
For Of
30,885
±0.61%
97% slower

For Each
1,183,367
±0.32%
fastest


https://jsperf.com/for-of-vs-for-short-arr
for
515,049
±4.44%
fastest

for..of
21,891
±6.85%
96% slower
Blocks: es6perf
> https://jsperf.com/pk-for-of-vs-for-each

this case ignores the return value of the function call, and looks like the whole loop gets optimized away in forEach case.
(between "func05-pass15-De-Beta-mir.gv" and "func05-pass16-RA check UCE-mir.gv", in iongraph)

but the loop is still there in for-of case.
Priority: -- → P3
Whiteboard: [qf:p3]
Type: enhancement → defect
Status: UNCONFIRMED → NEW
Ever confirmed: true
Performance Impact: --- → P3
Whiteboard: [qf:p3]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.