Tuesday 15 April 2014

jquery - Javascript run-time analysis -


I have written a javascript file using javascript, which I want to run on the run-time test. I have never done this before, and just curious about how this was, a site I saw, suggested as a measurement:

  var start = (new date) .getTime () ; / * Run a test * / var diff = (new date) .getTime () - get started;  

It is understandable, right now my script is working on a web page, all of which are the sorted click columns on a table. Apart from real time, what is my interest in knowing, how to interpret time in Big O Notation. Besides, is this script the most standard way of measuring run-time? Your idea is appreciated.

Update: Thank you for your input, Firebug is installed and I'm playing with Profiler. I will try to see if I can come up with an approximation to check time for Big O Notation.

Install Firefox with it, then add console.time ('anyTimerYouWant'); to start timer and console.indend ('anyTimerYouWant'); to end it.

Bigo Notation can not be easily calculated as the program I know.


No comments:

Post a Comment