arraytest
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var A = [];
A[0] = { data: 1 };
A[1] = { data: 1 };
A[2] = { data: 1 };
A[3] = { data: 1 };
var B = [];
B[0] = { data: 1 };
B[1] = { data: 1 };
B[10] = { data: 1 };
B[100] = { data: 1 };
var C = {};
C.index0 = { data: 1 };
C.index1 = { data: 1 };
C.index2 = { data: 1 };
C.index3 = { data: 1 };
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Flat array |
|
pending… |
Flat not aligned array |
|
pending… |
Assoc array |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by APXEOLOG
- Revision 2: published by APXEOLOG
0 comments