Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array vs TypedArray vs f32 write performance
(version: 1)
Comparing performance of:
Array write vs TypedArray write vs f32 vs i32
Created:
one year ago
by:
Guest
Jump to the latest result
Tests:
Array write
var array = new Array(100000).fill(0); for (let i=0; i<array.length; i++) { array[i] = array[i] + 1; }
TypedArray write
var typedArray = new Uint8Array(100000).fill(0); for (let i=0; i<typedArray.length; i++) { typedArray[i] = typedArray[i] + 1; }
f32
var typedArray = new Float32Array(100000).fill(0); for (let i=0; i<typedArray.length; i++) { typedArray[i] = typedArray[i] + 1; }
i32
var typedArray = new Uint32Array(100000).fill(0); for (let i=0; i<typedArray.length; i++) { typedArray[i] = typedArray[i] + 1; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Array write
TypedArray write
f32
i32
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36
Browser/OS:
Chrome Mobile 138 on Android
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array write
2381.9 Ops/sec
TypedArray write
6072.9 Ops/sec
f32
3513.7 Ops/sec
i32
3535.1 Ops/sec
Related benchmarks:
Direct Array vs Typed Array vs Array
Direct Array vs Typed Array vs Array read performances
Array vs TypedArray write performance
Push to: array vs float32array performance test
Array vs TypedArray write performance %%%%%%%%%%%%
Array vs TypedArray write performance ttttttt
Array vs TypedArray write performance2
Array vs TypedArray read performance
very big Array vs TypedArray write performance
Comments
Confirm delete:
Do you really want to delete benchmark?