Closed
Bug 869680
Opened 12 years ago
Closed 12 years ago
Firefox javascript "array" position swapping 10-20 times slower than Chrome when using an object as an array
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 827490
People
(Reporter: marrrcandre, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31
Steps to reproduce:
http://jsperf.com/array-memory-access-optimization
I'm changing the view on a 3D grid by swapping values around. My focus was in comparing between Chrome and Firefox performance more than comparing the performance difference between the two tests shown on jsperf.
Actual results:
Firefox is anywhere between 10-20 times slower than Chrome for the same tests
Expected results:
Would have expected a smaller performance gap between the two browsers.
Comment 1•12 years ago
|
||
Firefox Nightly is a lot faster for me than Chrome 26:
Browser FF Chrome
Writing 38.66 16.37
Reading 48.85 30.06
Comment 2•12 years ago
|
||
Pretty sure this is bug 827490 (should be fixed in Firefox 21, will be released next week).
Simple workaround is to use [] instead of {} here:
var axial_view = {};
and here:
var sagittal_view = {};
Updated•12 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Summary: Firefox javascript array position swapping 10-20 times slower than Chrome → Firefox javascript "array" position swapping 10-20 times slower than Chrome when using an object as an array
You need to log in
before you can comment on or make changes to this bug.
Description
•