gren-lang / gren-lang/compiler
Improve function call performance
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 503
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
elm-optimize-level-2 has a transformation which improves the function call performance of Elm code. In many cases I've seen this improve performance by up to 20%.
We should implement this optimization directly in Gren.
The way the optimization works is that when a function is called with the exact number of arguments as the function was defined to accept, we call the function directly without going through the Ax wrappers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the compiler code corresponding to the function-call transformation described in elm-optimize-level-2. Trace how calls are currently routed through Ax wrappers, then verify that exact-arity calls can use the direct path while other calls retain wrapper behavior; done means the optimization is implemented in Gren and its behavior is validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm, haskell
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100