Performance of Javascript timers (v2)

Revision 2 of this benchmark created by iProDev on


Setup

var perf = window.performance;
  function dateNow() {
      return Date.now();
  }
  function perfNow() {
      return perf.now();
  }

Teardown



            var t1;
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
Date.now()
t1 = Date.now();
ready
performance.now()
t1 = perf.now();
ready
Date.now() function
t1 = dateNow();
ready
performance.now() function
t1 = perfNow();
ready
perf.now();
t1 = perf.now();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Mateusz ★ on
  • Revision 2: published by iProDev on
  • Revision 3: published by Jiayong Ou on
  • Revision 4: published by Jiayong Ou on
  • Revision 5: published by Jiayong Ou on