map set fn vs class

Benchmark created on


Setup

const map1 = new Map();
const map2 = new Map();

class Test{}
function creator(){
	return function(){};
}

Test runner

Ready to run.

Testing in
TestOps/sec
fn
map1.set(creator(), 10);
ready
class instance
map2.set(new Test(), 10);
ready

Revisions

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