Skip to content

Optimize Enum.map |> Enum.filter |> Enum.map pipeline to a for comprehension#4174

Merged
SteffenDE merged 1 commit intophoenixframework:mainfrom
preciz:refactor-upload-consume-loop-2
Mar 23, 2026
Merged

Optimize Enum.map |> Enum.filter |> Enum.map pipeline to a for comprehension#4174
SteffenDE merged 1 commit intophoenixframework:mainfrom
preciz:refactor-upload-consume-loop-2

Conversation

@preciz
Copy link
Copy Markdown
Contributor

@preciz preciz commented Mar 18, 2026

This single comprehension avoids allocating intermediate lists and traversing the entries multiple times, resulting in better performance and memory efficiency.

2x faster and half the memory usage.

…hension

This single comprehension avoids allocating three intermediate lists and traversing the entries multiple times, resulting in better performance and memory efficiency.
@SteffenDE SteffenDE merged commit 48061f7 into phoenixframework:main Mar 23, 2026
8 checks passed
@SteffenDE
Copy link
Copy Markdown
Collaborator

🙌

SteffenDE pushed a commit that referenced this pull request Mar 27, 2026
…hension (#4174)

This single comprehension avoids allocating three intermediate lists and traversing the entries multiple times, resulting in better performance and memory efficiency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants