JavaScript / VBScript Test Bed
©Martin Francis, 2003

Some commonly used JavaScript programming methods work well for small numbers of iterations but scale badly. This may be refered to as "Non-Linear Scalability". One response to scalability problems on a web site is to "throw more hardware" at a problem. This simplistic approach often solves nothing, wheras a little fine tuning can work miracles.

Although originally designed for testing my own client-side JavaScript, developers may also tune their VBScript funtions with it (provided they use IE). Much of the JavaScript and VBScript code run server-side (where the scope for performance deficiencies is potentially much more alarming) can also be tested using this tool.
Run each example at 100 and 200 iterations and you will observe what appears to be a linear increase in time taken.
Run each of the examples at 2000 then 4000 iterations, rather than the time taken simply doubling, you will see marked non-linearity in all but two.
In fact, JS 3 and VB 2 represent by far the fastest and most linear routines in terms of scalability.

Sample code

(Please allow a minute or more to execute some of these tests on an average PC.)
Martin Francis is an Internet Technology Specialist