Skip to content

Instantly share code, notes, and snippets.

@kylebarrow
Created December 26, 2011 04:06
Show Gist options
  • Select an option

  • Save kylebarrow/1520505 to your computer and use it in GitHub Desktop.

Select an option

Save kylebarrow/1520505 to your computer and use it in GitHub Desktop.

Revisions

  1. @invalid-email-address Anonymous created this gist Dec 26, 2011.
    13 changes: 13 additions & 0 deletions perf.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    var start = new Date();

    var count = 1000000;

    while(count > 0)
    {
    // JS to perf test here
    count--;
    }

    var end = new Date();

    console.log("Duration: " + (end-start) + " ms");