Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
new Uint8Array() vs Uint8Array.from()
Test ArrayBuffer creation methods on a random Array
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/121.0.6167.171 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 121
Operating system:
iOS 17.3
Device Platform:
Mobile
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
Test new Uint8Array()
4.8M/s
Test Uint8Array.from()
4.4M/s
View exact numbers
Test name
Executions per second
✓
Test new Uint8Array()
4,801,731 Ops/sec
Test Uint8Array.from()
4,396,536 Ops/sec
Script Preparation code:
var randomArray = Array.from({ length: 1000 }, () => Math.floor(Math.random() * 256))
Tests:
Test new Uint8Array()
new Uint8Array(randomArray)
Test Uint8Array.from()
Uint8Array.from(randomArray)