fromjs vs map.mergeDeep

Benchmark created on


Preparation HTML

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

<script>


</script>

Setup

window.fromJsExample = () => {
	const thing = Immutable.fromJS({task_id: 123})
};

window.mapExample = () => {
	const thing = Immutable.Map().mergeDeep({task_id: 123});
};

Test runner

Ready to run.

Testing in
TestOps/sec
fromJS
window.fromJsExample();
ready
map
window.mapExample();
ready

Revisions

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