Question: I've written a Javascript file, using jQuery, that I would like to perform run-time tests on. I've never done this before and was just curious on how to go about it. One site I visited suggested this as a measurement:

```
var start = (new Date).getTime();
/* Run a test. */
var diff = (new Date).getTime() - start;

```

This makes sense, right now my script is acting on a web page, all it does is sort clicked-on columns in a table. What I'm interested in knowing, besides the actual timings, is how to interpret the timings in Big-O notation. Also, is this the most standard method of measuring script run-times? Your thoughts are appreciated.

UPDATE:
Thanks guys for your input, installed Firebug and am playing with the profiler. I'll attempt to see if I can come up with an approximation to check the timings against for Big-O notation.

Answer: 
The Firefox Firebug tool can be used to profile javascript and function execution time. You can find out more at <http://getfirebug.com/js.html>
Can you [try this](https://stackoverflow.com/questions/266373/one-could-use-a-profiler-but-why-not-just-halt-the-program/317160#317160)? It's a method that doesn't measure, it just tells what's costing the most time, as well as giving a good idea of what's happening time-wise.