Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Uint8Array vs Uint8ClampedArray - more numbers
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0
Browser:
Firefox 123
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
Uint8Array
1.0M/s
Uint8ClampedArray
969K/s
View exact numbers
Test name
Executions per second
✓
Uint8Array
1,043,515 Ops/sec
Uint8ClampedArray
968,940 Ops/sec
Script Preparation code:
var arr1 = new Uint8Array(1000); var arr2 = new Uint8ClampedArray(1000);
Tests:
Uint8Array
for(let i = 0; i < 1000; i++) arr1[i] = i % 255 arr1[37] = arr1[732]
Uint8ClampedArray
for(let i = 0; i < 1000; i++) arr2[i] = i % 255 arr2[37] = arr2[732]