Why is the execution time of this function call changing?
问题 Preface This issue seems to only affect Chrome/V8, and may not be reproducible in Firefox or other browsers . In summary, the execution time of a function callback increases by an order of magnitude or more if the function is called with a new callback anywhere else. Simplified Proof-of-Concept The same callback logic is stored in two different variables. Calling test(callback1) arbitrarily many times works as expected, but once you call test(callback2) , the execution time of the test