Test name | Executions per second |
---|---|
includes | 8513046.0 Ops/sec |
lookup | 14175337.0 Ops/sec |
indexof | 8470186.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