array vs function
JavaScript performance comparison
Preparation code
<script>
tilesArray1 = [];
tilesArray1.push([
["1"]
]);
tilesArray2 = []
tilesArray2.push({
position: [1, 1, 1]
});
var X = 0,
Y = 0,
Z = 0;
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
array |
|
pending… |
object |
|
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
- Revision 2: published by Robert Hurst
0 comments