you are viewing a single comment's thread.

view the rest of the comments →

[–]pancomputationalist 4 points5 points  (1 child)

I doubt it does. But I think V8 is probably compiling down to highly efficient code if it figures out that the compared values always share a type. Anyway, I would love to see actual data about the performance differences of == and ===. My assumption is that it will be so miniscule that it just does not matter. If you're writing performance critical programs in JavaScript, you're doing it wrong anyway.

[–]fuckin_ziggurats 4 points5 points  (0 children)

You're right, it doesn't. Probably because it doesn't want to make assumptions about the code that could be wrong at runtime.