For Loop Plus Plus (v3)

Revision 3 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
++<var> Operator
let myVar = 0;


for (let i = 0; i < 10000000; ++i) {
	if ((i & 1) === 1) {
		myVar = 1;
	} else {
		myVar = 0;
	}
}
ready
+= Operator
let myVar = 0;


for (let i = 0; i < 10000000; i += 1) {
	if ((i & 1) === 1) {
		myVar = 1;
	} else {
		myVar = 0;
	}
}
ready
<var>++ Operator
let myVar = 0;


for (let i = 0; i < 10000000; i++) {
	if ((i & 1) === 1) {
		myVar = 1;
	} else {
		myVar = 0;
	}
}
ready
<var> = <var> + 1
let myVar = 0;


for (let i = 0; i < 10000000; i = i + 1) {
	if ((i & 1) === 1) {
		myVar = 1;
	} else {
		myVar = 0;
	}
}
ready

Revisions

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