`JSON.stringify` vs `isEqual` (v3)

Revision 3 of this benchmark created on


Setup

const user1 = {
  width: 1200,
  height: 800
}

const user2 = {
  width: 1200,
  height: 800
}

Test runner

Ready to run.

Testing in
TestOps/sec
Lodash isEqual
const result = _.isEqual(user1, user2)
ready
stringify
const result = JSON.stringify(user1) === JSON.stringify(user2)

ready
component compare
const result = user1.width == user2.width && user1.height === user2.height
ready

Revisions

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