Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
Chrome 131
Windows
Desktop
2 months ago
Test name Executions per second
replace regex 2387585.8 Ops/sec
replace All 2258017.5 Ops/sec
Tests:
  • replace regex

    AخA
     
    "<CLNR><CR>光の中では見えないもの<CLNR><CR>が、暗闇の中ではよく<CR><CLGR>見える".replace(/<CLNR><CR>|<CR><CLGR>/g, "\r\n");
  • replace All

     
    "<CLNR><CR>光の中では見えないもの<CLNR><CR>が、暗闇の中ではよく<CR><CLGR>見える".replaceAll(/<CLNR><CR>|<CR><CLGR>/g, "\r\n");