for-array-tests
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var test_array = new Array(10000);
for (var i = 0; i < test_array.length; i++) {
test_array[i] = Math.random();
}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Simplest |
|
pending… |
Outer length precalc |
|
pending… |
Inner length precalc |
|
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 yzsolt
- Revision 2: published by Uniquely Common
0 comments