Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 123
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
Naive array equals
711K/s
_.isEqual Level 1
35K/s
JSON.stringify Level 1
4K/s
View exact numbers
Test name
Executions per second
✓
Naive array equals
711,002 Ops/sec
_.isEqual Level 1
35,343 Ops/sec
JSON.stringify Level 1
3,511 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)