Test name | Executions per second |
---|---|
_.isEqual | 1292252.0 Ops/sec |
JSON.stringify | 1132425.8 Ops/sec |
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
window.foo = {"page":0,"sort":"-transaction_at","filter":{"type":"deposit","opportunity_id":"8"}};
window.bar = {"page":1,"sort":"-transaction_at","filter":{"type":"deposit","opportunity_id":"8"}};
_.isEqual(window.foo, window.bar)
JSON.stringify(window.foo) === JSON.stringify(window.bar);