Script Preparation code:
x
 
var string = `eyJ0ZXN0IjoxLCJjb21wYW5pZXMiOlsxLDIsMyw0LDUsNl0sInVzZXIiOiJ0ZXN0IiwiZGF0ZSI6Illlc3RlcmRheSIsInN0YXJ0QXQiOiIyMDIzLTExLTAxVDAwOjAwOjAwLjAwMFoifQ==`;
Tests:
  • Regex

     
    string.replace(/(=+)$/, '')
  • Split

     
    string.split('=')[0]
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Regex
    Split

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.1 Safari/605.1.15
Safari 17 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Regex 5931178.0 Ops/sec
Split 15659519.0 Ops/sec