array perf

Benchmark created by csorfab on


Setup

let arra = new Array(1024)
  let arrb = new Float32Array(1024)
  let arrc = new Uint32Array(1024)

Test runner

Ready to run.

Testing in
TestOps/sec
norm arr map
arra.map(() => 0)
ready
norm arr fill
arra.fill(0)
ready
norm arr for
for(let i = 0; i < 1024; i++) {
arra[i] = 0
}
ready
float map
arrb.map(() => 0)
ready
float fill
arrb.fill(0)
ready
float for
for(let i = 0; i < 1024; i++) {
arrb[i] = 0
}
ready
uint map
arrc.map(() => 0)
ready
uint fill
arrc.fill(0)
ready
uint for
for(let i = 0; i < 1024; i++) {
arrc[i] = 0
}
ready
GENERATED_DEFAULT_DELETE_ME
GENERATED_DEFAULT_DELETE_ME
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by csorfab on