Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array vs TypedArray
(version: 1)
Array vs TypedArray
Comparing performance of:
Array write vs TypedArray write
Created:
one month ago
by:
Guest
Go to the latest result
Tests:
Array write
const a = new Array(0x1fff).fill(0); for(let i = 0; i < 0x1fff; i++) { for(let j = 0; j < 0x1fff; j++) { a[(i ^ j) & 0x1fff] = (i ^ j) & 0xff; } }
TypedArray write
const a = new Uint8Array(0x1fff); for(let i = 0; i < 0x1fff; i++) { for(let j = 0; j < 0x1fff; j++) { a[(i ^ j) & 0x1fff] = (i ^ j) & 0xff; } }
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:
one month ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0
Browser/OS:
Firefox 151 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
TypedArray write
14/s
Array write
9/s
View exact numbers
Test name
Executions per second
✓
TypedArray write
14 Ops/sec
Array write
9 Ops/sec
Related benchmarks
Object destructuring performance
test array and set
Push to: array vs float32array performance test 3
TestLoop
Array vs TypedArray write performance2
small Array vs TypedArray read performance
Comments
Confirm delete:
Do you really want to delete benchmark?