plus one vs plusplus (v15)

Revision 15 of this benchmark created on


Setup

var a = 0, 
  b = 1;

  Benchmark.prototype.setup = function() {
    var a = 0;
  };

Test runner

Ready to run.

Testing in WebKit 537.36 / undefined
TestOps/sec
Plus 1
( a += 1 );
ready
PlusPlus
( a++ );
ready
Plus Variable
( a += b );
ready
PrePlusPlus
( ++a );
ready

Revisions

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