testing

Benchmark created on


Preparation HTML

</section>

Test runner

Ready to run.

Testing in
TestOps/sec
reduce
const assign = (p) => {
	Object.keys(p).reduce((a,b) => ({...a,['aria-' + b]: p[b]}),{role: 'test'})
}
const a = [1,2,3,4,5,6,7,8,9,10,11,12]
const resp = a.map(_ => assign({controls: 'x',setsize: a.length, posinset: _}))

console.log({resp})
ready
directAssign
const assign = (p) => ({
  ['aria-controls']: p.controls,
  ['aria-setsize']: p.setsize,
  ['aria-posinset']: p.posinset	
})

const a = [1,2,3,4,5,6,7,8,9,10,11,12]
const resp = a.map(_ => assign({controls: 'x',setsize: a.length, posinset: _}))

console.log({resp})
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.