join vs template literals

Benchmark created on


Setup

const foo = "foo";
const bar = "bar";

const array = [foo, bar];

Test runner

Ready to run.

Testing in
TestOps/sec
join
[foo, bar].join("");
ready
template literal
`${foo}${bar}`;
ready
join (array reference)
array.join("");
ready

Revisions

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