maps

Benchmark created on


Setup

const map = new Map()

Teardown

map.clear()

Test runner

Ready to run.

Testing in
TestOps/sec
a
 let maybe = map.get('test')
 
 if (!maybe) {
 	maybe = {};
 	
 	map.set('test', maybe)
 }
 
 
 
 
ready
b
if (!map.has('test')) {
 	map.set('test', {})
 }
 
  const maybe = map.get('test')
ready

Revisions

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