How do you performance test JavaScript code?

前端 未结 22 1412
难免孤独
难免孤独 2020-11-22 04:18

CPU Cycles, Memory Usage, Execution Time, etc.?

Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code

22条回答
  •  借酒劲吻你
    2020-11-22 04:28

    I have a small tool where I can quickly run small test-cases in the browser and immediately get the results:

    JavaScript Speed Test

    You can play with code and find out which technique is better in the tested browser.

提交回复
热议问题