Script Preparation code:
AخA
 
var s1 = "foo|bar|test";
Tests:
  • Array.split

     
    var n1 = s1.split('|');
    console.log(n1.slice(1).join('|'))
  • Substring

     
    var pip = s1.indexOf('|');
    console.log(s1.substring(pip));
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.split
    Substring

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0
Firefox 97 on Windows
View result in a separate tab
Test name Executions per second
Array.split 40642.7 Ops/sec
Substring 34666.9 Ops/sec