keySeq vs toList (v6)

Revision 6 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
entrySeq
console.log(data.entrySeq().map(([key, value]) => ({ key, value })).toJS())
ready
toSeq
console.log(data.map((key, value) => ({ key, value })).toSeq().toJS())
ready

Revisions

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