Pre-increment vs post-increment

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Pre-increment
const max = 1_000_000;
for (let i = 0; i < max; ++i) {
	console.log(i);
}
ready
Post-increment
const max = 1_000_000;
for (let i = 0; i < max; i++) {
	console.log(i);
}
ready

Revisions

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