Do brackets make any difference?
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var x = 0;
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
No brackets (TRUE) |
|
pending… |
With brackets (TRUE) |
|
pending… |
No brackets w/ else (TRUE) |
|
pending… |
With brackets w/ else (TRUE) |
|
pending… |
No brackets (FALSE) |
|
pending… |
With brackets (FALSE) |
|
pending… |
No brackets w/ else (FALSE) |
|
pending… |
With brackets w/ else (FALSE) |
|
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
0 comments