Testing const concatenation

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
With const
const ONE = "one";
const TWO = "two";

function begin() {
	return ONE + TWO;
}

for(let i=0; i<100000; i++) begin();
ready
Without const
function begin() {
	return "one" + "two";
}

for(let i=0; i<100000; i++) begin();
ready

Revisions

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