Script Preparation code:
AخA
 
var string = '-firstDeadlineReminderData__PS__assignment__PS__perEntityType__PS__Applicant__PS__hasDeadline'
var regExp = new RegExp('__PS__', 'g');
Tests:
  • replace by regex

     
    var res = string.replace(regExp, '.')
  • replace via string

     
    var res = string.split('__PS__').join('.');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    replace by regex
    replace via string

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 10 days ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
replace by regex 7688162.5 Ops/sec
replace via string 10192039.0 Ops/sec