Script Preparation code:
AخA
 
var aaa = [1,2,3];
var bbb = [2,3,4];
var term = 1;
Tests:
  • separate

     
    aaa.indexOf(term) > -1 || bbb.indexOf(term) > -1
  • concat

     
    aaa.concat(bbb).indexOf(term) > -1
  • cool concat

     
    [...aaa, ...bbb].indexOf(term) > -1
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    separate
    concat
    cool concat

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4214.2 Safari/537.36
Chrome 86 on Mac OS X 10.14.6
View result in a separate tab
Test name Executions per second
separate 5383342.0 Ops/sec
concat 2286966.0 Ops/sec
cool concat 3065452.2 Ops/sec