HTML Preparation code:
AخA
 
1
<!--your preparation HTML code goes here-->
Script Preparation code:
 
/*your preparation JavaScript code goes here
To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/
async function globalMeasureThatScriptPrepareFunction() {
    // This function is optional, feel free to remove it.
    // await someThing();
}
Tests:
  • Split

    x
     
    /*When writing async/deferred tests, use `deferred.resolve()` to mark test as done*/
    const hasSubdomain = (hostname) => {
        return hostname.split('.').length > 2;
    };
    hasSubdomain('pixel.barion.com');
  • RegExp

     
    const hasSubdomain = (hostname) => {
        return /^[^.]+\.[^.]+\./.test(hostname);
    };
    hasSubdomain('pixel.barion.com');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Split
    RegExp

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 18 days ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Chrome 132 on Linux
View result in a separate tab
Test name Executions per second
Split 12315885.0 Ops/sec
RegExp 15790837.0 Ops/sec