0

I was just browsing the endless list of jsperf tests and looked at the one called == vs === perf. I expected the outcome to be a no-brainer ( === to be faster ) but no, not in FireFox.

Can someone explain to me how Firefox can be so fast and how it is possible that === is more or less equal to == ?

Although this post has a lot in common with my post, it doesn't answer the result Firefox produces!

4

1 回答 1

3

==vs.===不会对您的代码性能产生实际影响。这是一个微基准。

查看@mraleph 的演示文稿,解释为什么微基准测试是邪恶的,应该避免:https ://www.youtube.com/watch?v=65-RbBwZQdU&hd= 1 他解释了为什么像你链接的测试基本上没用,因为引擎优化了这样的事情。

于 2013-10-17T17:34:35.120 回答