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:

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.

This discussion has been closed. No further comments may be added.