plus one vs plusplus (v17)

Revision 17 of this benchmark created by Rick Waldron on


Setup

var a = 0, 
  b = 1;

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

Test runner

Ready to run.

Testing in
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.