Skip to content

Optimize Enum.into with Map.new and MapSet.new#4233

Closed
preciz wants to merge 1 commit into
phoenixframework:mainfrom
preciz:agent3
Closed

Optimize Enum.into with Map.new and MapSet.new#4233
preciz wants to merge 1 commit into
phoenixframework:mainfrom
preciz:agent3

Conversation

@preciz
Copy link
Copy Markdown
Contributor

@preciz preciz commented May 12, 2026

Summary

  • Replaces Enum.into(enumerable, %{}) with Map.new(enumerable) which is faster and cleaner.
  • Replaces Enum.into(enumerable, %{}, transform) with Map.new(enumerable, transform) which is significantly faster and uses less memory.
  • Replaces Enum.into(enumerable, MapSet.new(), transform) with MapSet.new(enumerable, transform) which is faster and cleaner.

@preciz preciz closed this May 12, 2026
@preciz
Copy link
Copy Markdown
Contributor Author

preciz commented May 12, 2026

Misconfigured AI agent opened this. Please ignore. The change seems ok though.

@preciz preciz deleted the agent3 branch May 12, 2026 15:22
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.

1 participant