Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array vs TypedArray write performance2
(version: 1)
Comparing performance of:
Array write vs TypedArray write
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; } let sum = 0; for (let i=0; i<array.length; i++) { sum+= array[i] }
TypedArray write
var typedArray = new Uint8Array(100000).fill(0); for (let i=0; i<typedArray.length; i++) { typedArray[i] = typedArray[i] + 1; } let sum = 0; for (let i=0; i<typedArray.length; i++) { sum += typedArray[i] }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array write
TypedArray write
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
4 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0
Browser/OS:
Firefox 146 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array write
881.5 Ops/sec
TypedArray write
3618.5 Ops/sec
Related benchmarks:
Array vs Typed Array vs Buffer Typed Array
UInt8Array vs cast to array index access 10k
Direct Array vs Typed Array vs Array read performances
Array vs TypedArray write performance
TypedArray set() vs setter performance
Get and set in typed array vs simple array
Array initialization: preallocate a typed array vs vanilla preallocation
Array vs TypedArray write performance %%%%%%%%%%%%
Array vs TypedArray write performance ttttttt
Comments
Confirm delete:
Do you really want to delete benchmark?