Test name | Executions per second |
---|---|
_.isEqual | 1255859.6 Ops/sec |
JSON.stringify | 1202626.5 Ops/sec |
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
window.foo = ['cat', 'dog', 'bird'];
window.bar = ['cat', 'dog', 'bird'];
_.isEqual(window.foo, window.bar)
JSON.stringify(window.foo) === JSON.stringify(window.bar);