Use Javascript code inline with the performance difference (IE / Firefox / Chrome) when the external function call

Test Results:

1. In the implementation of 10,000 or less times, almost no difference in all browsers .

 

2. compared to using an external inline code function, a slightly worse performance . Firefox ( difference of about 0.000005 (ms / Ci )); the Chrome ( difference of about 0.000005 (ms / Ci )); IE9 ( approximately difference 0.00001 (ms / time )).

 

3. In actual use, that there is no difference .

  

  The test chart are as follows: 

 

 

 

 Test file 

 

Reproduced in: https: //www.cnblogs.com/likestone/archive/2011/05/09/2041464.html

Guess you like

Origin blog.csdn.net/weixin_34077371/article/details/93752159