array equals

Benchmark created on


Preparation HTML

<script src="
https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js
"></script>

Setup

const a1 = []
const a2 = []
for (let a = 0; a < 1000; a++) {
	const rand = Math.random().toString(16).substr(2, 8);
	a1.push(rand)
	a2.push(rand)
}

Test runner

Ready to run.

Testing in
TestOps/sec
toString
a1.toString() === a2.toString()
ready
lodash isEqual
_.isEqual(a1, a2)
ready

Revisions

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