Script Preparation code:
x
 
var precomp = new RegExp(/[^A-Za-z0-9.-]+|(?=[-A-Za-z])|(?<=[A-Za-z])|(?<=\.\d+)(?=\.)/g);
var test = "M 0 0 L 10 10 L10 10 L20 20 M 0 0 L 10 10 L10 10 L20 20 M 0 0 L 10 10 L10 10 L20 20 M 0 0 L 10 10 L10 10 L20 20";
Tests:
  • precomp

     
    test.split(precomp);
  • literal

     
    test.split(/[^A-Za-z0-9.-]+|(?=[-A-Za-z])|(?<=[A-Za-z])|(?<=\.\d+)(?=\.)/g);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    precomp
    literal

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129 on Linux
View result in a separate tab
Test name Executions per second
precomp 20032.2 Ops/sec
literal 20092.2 Ops/sec