Closures And For Loop
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var f; // resulted function saved into this var
// instead of passing into setTimeout
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Test1 20 function objects |
|
pending… |
Tes2 20 function objects |
|
pending… |
Test3 11 function objects |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments