Script Preparation code:
AخA
 
var str = 'really rare  (Phone number hidden by company) (Email hidden by company)';
Tests:
  • Regex

     
    str.replace(/(\[TL_HIDDEN\])|(\[EMAIL_HIDDEN\])|(Phone number hidden by company)|(Email hidden by company)/g, "");
  • Multiple Split and Join

     
    str.split('(Phone number hidden by company)')
    .join('')
    .split('(Email hidden by company)')
    .join('')
    .split('[TL_HIDDEN]')
    .join('')
    .split('[EMAIL_HIDDEN]')
    .join('');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Regex
    Multiple Split and Join

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
Chrome 85 on Mac OS X 10.15.6
View result in a separate tab
Test name Executions per second
Regex 3840367.5 Ops/sec
Multiple Split and Join 845407.7 Ops/sec