Test

Benchmark created on


Setup

const data = [...Array(1000).keys()]

Test runner

Ready to run.

Testing in
TestOps/sec
Method 1
data.filter(d => d > 0).map(d => d)
ready
Method 2
data.reduce((acc,d) => {
  if (d > 0) acc.push(d)
  return acc
}, [])
ready

Revisions

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