Closed
Bug 737339
Opened 14 years ago
Closed 9 years ago
JavaScript Array splice too slow
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 592786
People
(Reporter: guo.raymin, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0
Build ID: 20120312181643
Steps to reproduce:
// testList.js
var L = [];
var i, k;
for (i = 0; i < 100000; i++)
L.push('k' + i);
for (i = 0; i < 100000; i++) {
if (i & 1) {
k = L.shift();
L.splice(i, 0, k);
} else {
k = L.splice(i, 1)[0];
L.push(k);
}
}
if ('function' == typeof(print))
print(i, L.length);
else
console.log(i, L.length);
Actual results:
time node testList.js : 0m5.277s
time xpcshell testList.js : 3m10.457s
Expected results:
Mozilla JavaScript Object base dict operate is faster than Google V8.
I hope the Array splice be better!
Updated•14 years ago
|
Assignee: nobody → general
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
QA Contact: untriaged → general
Comment 1•14 years ago
|
||
Isn't this basically a duplicate of bug 592786?
| Assignee | ||
Updated•12 years ago
|
Assignee: general → nobody
Updated•9 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•