flatMap() vs filter().map()

flatMap vs filter map
one year ago
User agent: Mozilla/5.0 (Android 13; Mobile; rv:109.0) Gecko/118.0 Firefox/118.0
Test name Executions per second
filter().map() 350.8 Ops/sec
flatMap() 340.2 Ops/sec
Script Preparation code:
Tests:
  • filter().map()

  • flatMap()

Open this result on MeasureThat.net