Functional Valhalla?
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
An exploration of flat and dense memory layouts in functional programming languages, motivated by the performance costs of pointer-rich data structures on modern hardware. The post surveys which functional languages support arrays of records with flat memory layouts: F# fully supports it (including records with pointer fields), Haskell supports it via the Data.Vector.Unboxed library (with caveats), and Clean supports it natively. Languages like OCaml, SML, Erlang/Elixir, and Scala appear to lack this support. The post also discusses implementing flat layouts as libraries in Scheme and Common Lisp, and concludes that functional language support for cache-efficient memory layouts remains limited compared to imperative languages.
Sort: