Running a filter over 100 000 elements

Benchmark created on


Setup

var bigArray = new Array(100000).fill('SpaceTakingWord')

Test runner

Ready to run.

Testing in
TestOps/sec
Filter once
bigArray
  .filter((x) => x === 'SpaceTakingWord')
  .filter((x) => x === 'SpaceTakingWord')
ready
Filter twice
bigArray
  .filter((x) => x === 'SpaceTakingWord' || x === 'SomethingElse')
ready

Revisions

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