ES6 String Literals vs. String Concatenation (v18)

Revision 18 of this benchmark created on


Setup

var precalculatedIso = (new Date()).toISOString();

Test runner

Ready to run.

Testing in
TestOps/sec
ES6 with variable
var test = `<body>
  <article>
    <time datetime='${ precalculatedIso }'>${ precalculatedIso }</time>
  </article>
</body>`;
ready
String concatenation with variable
var test = "<body>"+
  "<article>"+
    "<time datetime='" + precalculatedIso +"'>"+ precalculatedIso +"</time>"+
  "</article>"+
"</body>";
ready

Revisions

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