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:
  • precompiled

     
    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
    precompiled
    literal

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36
Chrome 94 on Linux
View result in a separate tab
Test name Executions per second
precompiled 191908.8 Ops/sec
literal 197435.8 Ops/sec