stringify Array.from vs Array#map

Benchmark created on


Description

bleh

Setup

const arr = [1, 2, 3, 4, 'asd', [1], {}, NaN, null];

Test runner

Ready to run.

Testing in
TestOps/sec
map
for (let i = 0; i < 1000; i++) {
	const foo = arr.map(String);
}
ready
from
for (let i = 0; i < 1000; i++) {
	const foo = Array.from(arr, String);
}
ready

Revisions

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