Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array comparison: JSON.stringify vs react-fast-compare vs _.isEqual
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Browser:
Chrome 122
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
JSON.stringify
3405225.0 Ops/sec
react-fast-compare
5306104.0 Ops/sec
lodash
5352105.0 Ops/sec
HTML Preparation code:
<script src='https://cdn.jsdelivr.net/npm/react-fast-compare@3.2.0/index.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
window.a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] window.b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Tests:
JSON.stringify
JSON.stringify(window.a) === JSON.stringify(window.b);
react-fast-compare
equal(window.a, window.b)
lodash
_.isEqual(a,b)