Notes (HPFP 28/31): Basic Libraries
28 Basic Libraries
28.2 Benchmarking with Criterion
28.3 Profiling your programs
see benchmark/profilingTime.prof
see benchmark/src/profilingSpace.ps
28.4 Constant applicative forms
see benchmark/cafSaturation.prof
see benchmark/cafSaturation2.prof
see benchmark/cafSaturation3.prof
28.5 Map
Exercise: Benchmark Practice
see benchmark/src/mapSetBench.hs
28.8 Vector
Exercises: Vector
Enable profiling in stack.yaml
with:
build:
library-profiling: true
executable-profiling: true
see benchmark/src/vectorMemory.hs
28.10 Chapter Exercises
Difference List
A simple queue
28.10 Chapter Exercises
28.11 Follow-up resources
- Criterion tutorial; Bryan O’Sullivan
- Demystifying DList; Tom Ellis
- Memory Management; GHC; Haskell Wiki
- Performance; Haskell Wiki
- Pragmas, specifically UNPACK; GHC Documentation
- High Performance Haskell; Johan Tibell
- Haskell Performance Patterns; Johan Tibell
- Faster persistent data structures through hashing; Johan Tibell
- Lazy Functional State Threads; John Launchbury and Simon Peyton Jones
- Write Haskell as fast as C: exploiting strictness, laziness and recursion; Don Stewart
- Haskell as fast as C: A case study; Jan Stolarek
- Haskell FFT 11: Optimisation Part 1; Ian Ross
- Understanding the RealWorld; Edsko de Vries
- Stream Fusion; Duncan Coutts
- Purely functional data structures; Chris Okasaki