keySeq vs toList (v5)

Revision 5 of this benchmark created on


Preparation HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/immutable/4.3.0/immutable.min.js"></script>

Setup

const data = (() => {
	let map = Immutable.Map()
	for(var i = 0; i <= 10; i++) {
	    map = map.set(`key${i}`, Math.random())
	}
	
	return map
})()

Test runner

Ready to run.

Testing in
TestOps/sec
Key Seq
console.log(data.keySeq().map((key) => ({ key, value: data.get(key) })).toJS())
ready
toList
console.log(data.entrySeq().map(([key, value]) => ({ key, value })).toJS())
ready

Revisions

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