Script Preparation code:
AخA
 
window.a = 'abcdefghijklmnopqrstuvwxyz'
Tests:
  • spread

     
    const r = [...a].join('.*?')
  • split

     
    const r = a.split('').join('.*?')
  • replace

     
    const r = a.replace(/(.)/g, '$1*?')
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    spread
    split
    replace

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Safari/537.36
Chrome 87 on Windows
View result in a separate tab
Test name Executions per second
spread 606747.1 Ops/sec
split 595200.4 Ops/sec
replace 353789.1 Ops/sec