Test name | Executions per second |
---|---|
includes | 32341952.0 Ops/sec |
lookup | 1503163008.0 Ops/sec |
indexof | 37468484.0 Ops/sec |
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)
return a.includes('mx')
return b.has('mx')
return a.indexOf('mx') >= 0