.(dot) vs [](square bracket)
JavaScript performance comparison
Preparation code
<script>
var doc = "document";
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
. |
|
pending… |
[] with literal |
|
pending… |
[] with variable |
|
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 JavaScript Nazi
- Revision 2: published by Kyle Simpson
- Revision 5: published by Michael Norman
- Revision 6: published by blocks-vs-functions
- Revision 7: published
- Revision 8: published by mah0x211
- Revision 9: published by mah0x211
0 comments