eqeqeq vs eq
JavaScript performance comparison
Info
Check performance of === vs == in varying situations.
Preparation code
<script>
var e = '',
z = '',
isUNL = function (v) { return typeof v !== 'undefined' && v !== null && e.length !== 0; };
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
e eqeqeq empty |
|
pending… |
e eqeq empty |
|
pending… |
e.length eqeqeq 0 |
|
pending… |
e.length eqeq 0 |
|
pending… |
e.length |
|
pending… |
isUNL |
|
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
- Revision 3: published by Mike McCaughan
- Revision 4: published by Mike McCaughan
- Revision 5: published by Mike McCaughan
- Revision 6: published by Mike McCaughan
- Revision 7: published by Mike McCaughan
- Revision 8: published
0 comments