What is a good way to measure code execution time in VBScript?
Or failing that how to do it in JavaScript?
d = new Date(); x = 0; for (i = 0; i < 1e7; ++i) { x += i; } d2 = new Date(); d2 - d 12296
Use the Date object, which returns a valueOf() in milliseconds since Jan 1 1970. You can then subtract times to get elapsed time in milliseconds.
Date
valueOf()