haskellfoundation / hs-opt-handbook.github.io

The Haskell Optimization Handbook
https://haskell.foundation/hs-opt-handbook.github.io/
Creative Commons Attribution 4.0 International
170 stars 12 forks source link

Make a Guideline section #17

Open doyougnu opened 2 years ago

doyougnu commented 2 years ago

Section should be small bite size snippets of recommendations for performance:

  1. Use strict data
  2. unpack strict fields if you don't need laziness
  3. let GHC optimize for you, except in extremely hot loops where your effort is worth it
  4. only use lists as a stack etc.

each one should have a variable and name associated so they can be linked throughout the text.