flatMap vs reducedddd

2 months ago
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 OPR/79.0.4143.50
Test name Executions per second
reduce with concat 17157.4 Ops/sec
flatMap 501.7 Ops/sec
Script Preparation code:
Tests:
  • reduce with concat

  • flatMap

Open this result on MeasureThat.net