bcherny / bcherny/concat-maps

Unnecessary array allocation

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

`Array.from` call in `concat2` function creates a new temporary array which is used only to call `forEach`, it doesn't seem efficient. Why not to iterate `map2` itself with `for..of` syntax?

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the concat2 function and inspect the Array.from call that feeds forEach, along with how map2 is used. Replace the temporary-array iteration with direct iteration over map2 while preserving the existing concatenation behavior; verify the project's available checks after the change.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.