Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Typed array vs normal array
(version: 0)
Comparing performance of:
Typed array vs Array
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
let typedarr = new Float32Array(1000000); let array = Array.from({length: 1000000}, () => 0)
Tests:
Typed array
typedarr[0] = Math.random(); for (let i = 2; i < 1000000; i++) { typedarr[i] = typedarr[i - 1] + typedarr[i - 2]; }
Array
array[0] = Math.random(); for (let i = 2; i < 1000000; i++) { array[i] = array[i - 1] + array[i - 2]; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Typed array
Array
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0
Browser/OS:
Firefox 142 on Ubuntu
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Typed array
329.9 Ops/sec
Array
322.4 Ops/sec
Comments
Confirm delete:
Do you really want to delete benchmark?