Closed
Bug 782579
Opened 12 years ago
Closed 12 years ago
strict mode causes a 66% slow down in simplex-noise.js execution
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jonas, Unassigned)
References
()
Details
(Keywords: perf, Whiteboard: [js:p2])
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.0 Safari/537.4
Steps to reproduce:
Open http://jsperf.com/simplex-noise-strict-vs-lax
Run the benchmark.
Actual results:
In firefox, and only firefox, there is a big discrepancy in the execution speed of the code between "strict mode" and "normal mode".
Expected results:
Performance should at least be in the same area.
Comment 1•12 years ago
|
||
Same here with FF15, MacOS X.
Updated•12 years ago
|
Assignee: nobody → general
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Comment 2•12 years ago
|
||
This is probably at least in part caused by bug 690446. There are some other sources of slowdown for strict code, but not emitting GNAME opcodes is the biggest one.
Note that, while the benchmark's setup function contains var declarations for all variables used in the benchmark code itself, those declarations are local to the setup function, so they won't affect the benchmark code. This leads to the latter using global properties.
Reporter | ||
Comment 3•12 years ago
|
||
I created a new revision of the benchmark to address the var issue: http://jsperf.com/simplex-noise-strict-vs-lax/2
Comment 4•12 years ago
|
||
A quick look with the JIT Inspector doesn't show any really meaningful differences. That probably doesn't mean anything, though, as with the inspector active, the times become pretty much identical.
CCing bhackett as he might know other reasons for this slowdown.
Updated•12 years ago
|
Whiteboard: [js:p2]
Comment 5•12 years ago
|
||
I ran the 2nd version and I got 159 x 163. Seems to be fixed.
Reporter | ||
Comment 6•12 years ago
|
||
Tried it in the current nightly 23.0a1 (2013-05-08) and the difference seems to be gone.
Comment 7•12 years ago
|
||
Thanks guys, looks like bug 690446 was the only problem here and this bug is fixed now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•