large array
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var arr = [], arr2 = [], cnt = 100000;
for (var i = 0; i < cnt; i++) {
arr.push(i);
}
for (var i = 0; i < cnt; i++) {
arr2.push(i);
}
delete arr2[100];
delete arr2[2000]
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
one |
|
pending… |
two |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments