Script Preparation code:
AخA
 
var sampleOptions = ['прицеп полуприцеп', 'прицеп картофелевоз'];
var options = Array.from(Array(1000)).map((_, i) => sampleOptions[i % 2]);
Tests:
  • startsWith

     
    options.filter(option => option.startsWith('прицеп'));
  • includes

     
    options.filter(option => option.includes('картофел'));
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    startsWith
    includes

    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/96.0.4664.27 Safari/537.36
Chrome 96 on Linux
View result in a separate tab
Test name Executions per second
startsWith 63180.5 Ops/sec
includes 38920.4 Ops/sec