Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Uint8array equality benchmark
Test on isEqual performance
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0
Browser:
Firefox 138
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
11 months ago
Test name
Executions per second
_.isEqual Level 1
542205.1 Ops/sec
JSON.stringify Level 1
17742.1 Ops/sec
Naive array equals
4457847.0 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
Script Preparation code:
window.data1 = new Uint8Array([...Array(1000).keys()].map(k=>k%8)) window.data2 = new Uint8Array([...Array(1000).keys()].map(k=>k%8)) window.arrayEquals = function(a, b) { return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((val, index) => val === b[index]); }
Tests:
_.isEqual Level 1
_.isEqual(window.data1, window.data2)
JSON.stringify Level 1
JSON.stringify(window.data1) === JSON.stringify(window.data2);
Naive array equals
window.arrayEquals(window.data1, window.data2)