Tests:
  • or

    AخA
     
    const testObj = { prop1: false, prop2: false, prop3: true};
    const orResult = testObj.prop1 || testObj.prop2 || testObj.prop3;
  • some 1

     
    const testObj = { prop1: 'val1', prop2: 'val2', prop3: 'val3'};
    ['prop1', 'prop2', 'prop3'].some(val => testObj[val]);
  • some 2

     
    const testObj = { prop1: 'val1', prop2: 'val2', prop3: 'val3'};
    [testObj.prop1, testObj.prop2, testObj.prop3].some(val => val);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    or
    some 1
    some 2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121 on Windows
View result in a separate tab
Test name Executions per second
or 172305344.0 Ops/sec
some 1 141097568.0 Ops/sec
some 2 150787376.0 Ops/sec