Multi-dimensional array - map() vs fill()

JavaScript performance comparison

Test case created by FatalMerlin

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Array.map()
Array(1000).fill().map(() => Array(1000).fill(0));
pending…
Array.from()
Array.from(Array(1000), _ => Array(1000).fill(0));
pending…
[...Array()].map()
[...Array(1000)].map(e => Array(1000).fill(0));
pending…

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

0 Comments