Script Preparation code:
AخA
 
var a = [
  'height',
  'width',
  'maxHeight',
  'maxWidth',
  'maxHeight',
  'minWidth',
  'color',
  'bg',
  'backgroundColor',
  'opacity',
  'm',
  'mt',
  'mb',
  'mr',
  'mr',
  'mx',
  'my',
  'p',
  'pt',
  'pb',
  'pr',
  'pl',
  'px',
  'py',
  'border',
  'boxShadow',
  'flex',
  'verticalAlign',
  'textAlign',
  'overflow',
  'display',
  'cursor'
];
var b = new Set(a)
Tests:
  • includes

     
    return a.includes('mx')
  • lookup

     
    return b.has('mx')
  • indexof

     
    return a.indexOf('mx') >= 0
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    includes
    lookup
    indexof

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 22 days ago)
Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0
Firefox 138 on Linux
View result in a separate tab
Test name Executions per second
includes 20169352.0 Ops/sec
lookup 1365044736.0 Ops/sec
indexof 25141462.0 Ops/sec