Templates vs Strings (v2)

Revision 2 of this benchmark created on


Setup

const arr = []
const arr2 = []

Test runner

Ready to run.

Testing in
TestOps/sec
Template
for (let index = 0; index < 1000000; index++) {
  arr.push(`this is a longish string and it doesn't have any interpolation`);
}
ready
String
for (let index = 0; index < 1000000; index++) {
  arr2.push("this is a longish string and it doesn't have any interpolation");
}
ready

Revisions

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