What is a good way to measure code execution time in VBScript?
Or failing that how to do it in JavaScript?
For JavaScript, I would recommend you to use a profiler, like the one built-in in Firebug:
(source: getfirebug.com)
Other alternatives can be the one included with Google Chrome, or IE8
If you want to do it programmatically, you could use Date objects to get a time difference:
var startTime = new Date();
// ...
// ...
var endTime = new Date();
var delta = endTime - startTime; // difference in milliseconds