Skip to content

Optimize template rendering in Diff engine#4243

Open
preciz wants to merge 1 commit into
phoenixframework:mainfrom
preciz:optimize-diff-iodata
Open

Optimize template rendering in Diff engine#4243
preciz wants to merge 1 commit into
phoenixframework:mainfrom
preciz:optimize-diff-iodata

Conversation

@preciz
Copy link
Copy Markdown
Contributor

@preciz preciz commented May 23, 2026

Avoid calling Enum.reverse by building nested iodata left-to-right via tail-recursion in one_to_iodata.
Check dynamic binaries directly with case statement to bypass to_iodata recursively.

Speedup should be 1.2x-1.3x with 5% memory saved when compared at render.

Avoid calling Enum.reverse/1 and reduce map lookups by building nested iodata left-to-right via tail-recursion in one_to_iodata/7. Check dynamic binaries directly within a single case statement to bypass to_iodata/4 recursively.
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