ThomasReggi
ThomasReggi

Reputation: 59345

Comparing alike javascript code

As we all know, there are multiple ways of going about doing the same thing. I am looking for a way to compare the efficiency of three different JavaScripts that do the same thing. I've placed all of the code in different text files just to rank the file size, but I don't think the smallest code is necessarily the most efficient. I have chrome developer tools, and firebug will these get the job done or is there a fancier way?

Upvotes: 1

Views: 60

Answers (3)

Alex Pacurar
Alex Pacurar

Reputation: 5861

you can use the jsPerf.com site to test performance on different js codes.

Upvotes: 3

jcomeau_ictx
jcomeau_ictx

Reputation: 38412

One way would be to create some test data, and set up a loop to benchmark each of your Javascript programs by running the data through some number of times, say 10000 repetitions with each program. Use Javascript to time each program and show you the times for each.

Upvotes: 0

dhinesh
dhinesh

Reputation: 4764

Use dynatrace to measure the efficiency of the javascript.

http://www.dynatrace.com

Upvotes: 0

Related Questions