When you’re replacing one for
loop for two iterator functions, filter
and map
, you’ve sacrificed performance for style. In performance centric programs I’d think it’s a bad call. Here’s a benchmark of both of your examples:
When you’re replacing one for
loop for two iterator functions, filter
and map
, you’ve sacrificed performance for style. In performance centric programs I’d think it’s a bad call. Here’s a benchmark of both of your examples: