

 '===' faster than '=='? - 1p1e1
http://jsperf.com/triple-equals-vs-twice-equals

======
1p1e1
'===' performs better than '==' because no type conversion is need. Are there
any reasons you would use '==' instead of '==='?

~~~
zachrose
When you know ahead of time that the types don't need to be coerced:

<http://jsperf.com/triple-equals-vs-twice-equals/4>

There's even a negligible performance improvement, at least for me (iPad
WebKit Safari).

~~~
1p1e1
For me the "3-equals-true-non-coerced" is the fastest in Chrome 16.

------
kenneth_reitz
Shouldn't this be obvious?

------
DrJokepu
I don't get it, both on my iPad 2 (iOS 5.0.1) and my MacBook (Firefox 8.0.1)
== is several times faster than === which is completely the opposite of what I
would be expecting. Perhaps someone who's familiar with the internals of
JavaScript JIT compilers could shed some light on it?

