Comparison between using JS' native flatMap, a custom flatMap, and lodash's flatMap. Custom flatMap works with all Iterable types, so need to convert Map's to arrays before flatMapping.
Comparing performance of: Native JS flatMap vs Custom flatMap vs lodash flatmap
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
Native JS flatMap
Custom flatMap
lodash flatmap
Fastest:N/A
Slowest:N/A
Latest run results:
Run details: (Test run date:
13 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36