Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
For preallocate
(version: 0)
Comparing performance of:
Preallocate vs Preallocate with fill vs Non preallocate vs Int32array
Created:
5 years ago
by:
Guest
Jump to the latest result
Tests:
Preallocate
let a=new Array(1000) for (let i=0;i<a.length;i++) { a[i]=i; }
Preallocate with fill
let a=new Array(1000).fill(0) for (let i=1;i<a.length;i++) { a[i]=i; }
Non preallocate
let a=[] for (let i=0;i<a.length;i++) { a[i]=i; }
Int32array
let a=new Int8Array(1000) for (let i=1;i<a.length;i++) { a[i]=i; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Preallocate
Preallocate with fill
Non preallocate
Int32array
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
toFixed vs toPrecision vs Math.round() vs Math.floorfast
Math.floorfast with addition
toFixed vs toPrecision vs Math.round() vs Math.floorfast vs new Math.trunc str dynamic
toFixed() vs String(Math.floor()
toFixed() vs String(Math.floor()) vs Math.floor().toString()
Comments
Confirm delete:
Do you really want to delete benchmark?