Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Array vs Typed Array vs Buffer Typed Array
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0
Browser:
Firefox 142
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
typed Array no buffer
1K/s
typed array from Buffer
870/s
Array
254/s
View exact numbers
Test name
Executions per second
✓
typed Array no buffer
1,265 Ops/sec
typed array from Buffer
870 Ops/sec
Array
254 Ops/sec
Script Preparation code:
var size = 450000; var buf = new ArrayBuffer(size); var normalArray = new Array(size); var arrayFromBuffer = new Uint8Array(buf); var arrayWithoutBuffer = new Uint8Array(size);
Tests:
Array
for (i =0; i< size; i++){ normalArray[i] = 0; }
typed array from Buffer
for (i =0; i< size; i++){ arrayFromBuffer[i] = 0; }
typed Array no buffer
for (i =0; i< size; i++){ arrayWithoutBuffer[i] = 0; }