Run details:
Mozilla/5.0 (Linux; Android 12; RMX3363) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Mobile Safari/537.36
Chrome Mobile 101
Android
Mobile
2 years ago
Test name Executions per second
includes 240698.1 Ops/sec
lookup 1434139.8 Ops/sec
Script Preparation code:
AخA
 
var a = [];
for (var i = 0; i < 1000; i++)
  a[i] = i;
var b = new Set(a)
Tests:
  • includes

     
    return a.includes(900)
  • lookup

     
    return b.has(900)