Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
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; rv:137.0) Gecko/20100101 Firefox/137.0
Browser:
Firefox 137
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
JSON.stringify
424395.5 Ops/sec
react-fast-compare
974318.6 Ops/sec
lodash
180378.8 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 = { ab: { hello: "user", b: { aaa: 123, b: ["ggg"] }, c: [{ hj: "123", b: { h: "zzz" } }, { ll: "12r" }] }, azz: [1, 2, 3, 5] }; window.b = { ab: { hello: "user", b: { aaa: 123, b: ["ggg"] }, c: [{ hj: "123", b: { h: "zzz" } }, { ll: "12r" }] }, azz: [1, 2, 3, 568] };
Tests:
JSON.stringify
JSON.stringify(window.a) === JSON.stringify(window.b);
react-fast-compare
equal(window.a, window.b)
lodash
_.isEqual(a,b)