HTML Preparation code:
AخA
 
1
<!--your preparation HTML code goes here-->
Script Preparation code:
 
const slug = '1234567890';
Tests:
  • Template Literal

     
    for (let i = 0; i < 1000000; i++) {
      const url = `/${slug}.html`;
    }
  • String Concatenation

     
    for (let i = 0; i < 1000000; i++) {
      const url = '/' + slug + '.html';
    }
  • Array.join()

     
    for (let i = 0; i < 1000000; i++) {
      const url = ['/', slug, '.html'].join('');
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Template Literal
    String Concatenation
    Array.join()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 21 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0
Chrome 134 on Windows
View result in a separate tab
Test name Executions per second
Template Literal 401.9 Ops/sec
String Concatenation 602.9 Ops/sec
Array.join() 18.7 Ops/sec