How do you write data structures that are as efficient as possible in GHC? [closed]

That’s a big topic! Most has been explained elsewhere, so I won’t try to write a book chapter right here. Instead:

  • Real World Haskell, ch 25, “Performance” – discusses profiling, simple specialization and unpacking, reading Core, and some optimizations.

Johan Tibell is writing a lot on this topic:

  • Computing the size of a data structure
  • Memory footprints of common data types
  • Faster persistent structures through hashing
  • Reasoning about laziness

And some things from here:

  • Reading GHC Core
  • How GHC does optimization
  • Profiling for performance
  • Tweaking GC settings
  • General improvements
  • More on unpacking
  • Unboxing and strictness

And some other things:

  • Intro to specialization of code and data
  • Code improvement flags

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)