haskellfoundation / haskellfoundation/hs-opt-handbook.github.io

Nail down Unknown vs Known function calls

Open
#107 1 comment 0 reactions 1 assignee Claimed by @doyougnu View on GitHub
ghc
Dominant language
HTML
Stars
190
Forks
11
PR merge metrics
No merged PRs in 30d

Description

We have a decent overview of this now, but we really should have a much more robust section (probably in the STG chapter #14) that covers:

- known vs unknown functions: across different boundaries: modules, packages
- fast and slow stg applies, genutils
- how to check for known and unknown (prof report)
- performance consequences of exporting a function from a module
- How these interact with interface files
- probably something about unfoldings

Some resources:
- https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/haskell-execution/function-calls
- https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/haskell-execution/calling-convention
- the eval-apply paper. This is where a lot of the theory gets covered for the STG maching (besides SPJ's book) but we need to know the implementation to really understand the performance consequences.

Basically, as a user of GHC I want to:
- understand the consequences of exporting a function with respect to runtime performance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.