michaelficarra/underscore — comment on commit 221161ceccd224f9b0f871426ddd656f358a2f5b
File: underscore.js line 733
By michaelficarra:

I believe `==` is faster when comparing things of the same type, especially when the interpreter can determine statically that they will be the same type. Like `typeof X == 'string literal'`. There was a test on JSPerf, but I have no idea how to find it again... Regardless, it's a very *very* small optimisation, whichever way is faser.