Javascript performance tests

My “Javascript performance experience”: from a few days ago inspired me in starting to write a Javascript performance test suite. The first part is the performance of loops. Yes, those lovely for, while and, do…while constructs.

The tests are as follows:
* “for”:
* “while”:
* “do…while”:
* “for … in … 1”:
* “for … in … 2”:
* “for … in … 3”:
I’m not going to draw any conclusions on anything here, I’ll let you do that, and optimize your scripts if neccesary. Please note that the three for ( … in … ) tests are different, and the last one may take several minutes to complete, and may even possibly lock your system while doing so.

Comments are closed.