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
JSLitmus is a lightweight tool for creating ad-hoc JavaScript benchmark tests
Let examine the performance between function expression
and function constructor
:
What I did above is create a function expression
and function constructor
performing same operation. The result is as follows:
FireFox Performance Result
IE Performance Result