JavaScript var vs let (de)optimization/slowdown issue in FF/SpiderMonkey
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Tracking
()
People
(Reporter: olvap80, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: triage-deferred)
Attachments
(1 file)
(deleted),
image/png
|
Details |
Updated•8 years ago
|
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Comment 3•7 years ago
|
||
Updated•7 years ago
|
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
I looked into this again. We should certainly allocate the lexical environment object in JIT code. For this micro benchmark at least we probably can't do any scalar replacement, because we have the OSR entry.
Comment 6•5 years ago
|
||
Linux amd64
Firefox 68.5.0esr
without_let: 100ms
let_below: 98ms
let_above_and_in_loop: 303ms
let_in_loop: 96ms
all_let: 304ms
Firefox Nightly 75.0a1 (2020-03-06)
without_let: 101ms
let_below: 96ms
let_above_and_in_loop: 96ms
let_in_loop: 98ms
all_let: 101ms
So it looks to be fixed in Nightly now.
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Hi.. I've just tested this in 85.0.2 (64-bit), and unfortunately it's still (or again?) an issue:
without_let: 105ms
let_below: 101ms
let_above_and_in_loop: 262ms
let_in_loop: 101ms
all_let: 260ms
Comment 8•4 years ago
|
||
(In reply to matthew.w.fearnley from comment #7)
Hi.. I've just tested this in 85.0.2 (64-bit), and unfortunately it's still (or again?) an issue:
Thanks for the heads-up! It regressed with the new compiler. I've filed bug 1692855 and bug 1692856 to investigate this further.
Description
•