HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 30 community runs

Desktop Results:
Chrome 25 runs
array.where
4.4M/s
$.grep
3.1M/s
grepAlone
3.0M/s
angular.$filter
2.3M/s
underscore.filter
1.3M/s
array.filter
1.2M/s
array.find
1.2M/s
lodash.filter
1.1M/s

Fastest: array.where (4.1x faster)

View exact numbers
  • array.where: 4,406,960 ops/sec
  • $.grep: 3,100,420 ops/sec
  • grepAlone: 3,049,837 ops/sec
  • angular.$filter: 2,277,468 ops/sec
  • underscore.filter: 1,276,318 ops/sec
  • array.filter: 1,190,908 ops/sec
  • array.find: 1,187,693 ops/sec
  • lodash.filter: 1,085,512 ops/sec
Firefox 5 runs
array.find
8.3M/s
grepAlone
4.7M/s
array.where
4.6M/s
lodash.filter
4.0M/s
array.filter
3.9M/s
underscore.filter
3.9M/s
$.grep
3.8M/s
angular.$filter
2.1M/s

Fastest: array.find (4.0x faster)

View exact numbers
  • array.find: 8,311,051 ops/sec
  • grepAlone: 4,702,064 ops/sec
  • array.where: 4,625,873 ops/sec
  • lodash.filter: 3,979,714 ops/sec
  • array.filter: 3,899,860 ops/sec
  • underscore.filter: 3,851,318 ops/sec
  • $.grep: 3,762,176 ops/sec
  • angular.$filter: 2,102,092 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    $.grep
    array.find
    array.where
    angular.$filter
    array.filter
    lodash.filter
    underscore.filter
    grepAlone

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Chrome 144 on Linux
View result in a separate tab
array.filter
4.7M/s
array.where
4.4M/s
$.grep
4.0M/s
grepAlone
2.8M/s
angular.$filter
1.3M/s
underscore.filter
821K/s
array.find
725K/s
lodash.filter
526K/s
View exact numbers
Test name Executions per second
array.filter 4,727,769 Ops/sec
array.where 4,389,146 Ops/sec
$.grep 3,953,564 Ops/sec
grepAlone 2,789,346 Ops/sec
angular.$filter 1,287,848 Ops/sec
underscore.filter 820,523 Ops/sec
array.find 725,484 Ops/sec
lodash.filter 526,165 Ops/sec