Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Chrome 132
Mac OS X 10.15.7
Desktop
one month ago
Test name Executions per second
String literal 240626592.0 Ops/sec
Template literal 232897440.0 Ops/sec
HTML Preparation code:
AخA
 
1
<!--your preparation HTML code goes here-->
Script Preparation code:
x
 
/*your preparation JavaScript code goes here
To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/
async function globalMeasureThatScriptPrepareFunction() {
    // This function is optional, feel free to remove it.
    // await someThing();
}
const TEST_ITERATIONS=100000;
Tests:
  • String literal

     
    /*When writing async/deferred tests, use `deferred.resolve()` to mark test as done*/
    for (let i=0; i++; i<TEST_ITERATIONS) {
      const stringLiteral = "This is a string without variables or concatting";
    }
  • Template literal

     
    for (let i=0; i++; i<TEST_ITERATIONS) {
      const templateLiteral = `This is a string without variables or concatting`;
    }