ICFP 2024 (series) / Haskell 2024 (series) / Haskell 2024 /
[HIW] A zero-copy interface to compact regions powered by destinations
A compact region is a block of memory that is managed as a whole opaque object by the GC, and is freed only when the last element of the region is no longer in use. Compact regions are useful to reduce GC costs when managing hordes of objects with a similar lifetime. Unfortunately, in current GHC, there is no way to write in a region except by deep-copying an object already allocated in the GC heap.
I present an interface that brings a new way to write data in a compact region, without allocating it in the GC heap first, using destination-passing techniques. The heavy work is done in userland Haskell, and relies on linear types for safety; but I also had to extend GHC with 3 new (very unsafe!) primops that I describe in the talk.
Sat 7 SepDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
Sat 7 Sep
Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
11:00 - 12:30 | |||
11:00 22mTalk | [HIW] Analysing the heap of uninstrumented Haskell programs using ghc-debug Haskell Zubin Duggal Well-Typed LLP | ||
11:22 22mTalk | [HIW] A zero-copy interface to compact regions powered by destinations Haskell Thomas BAGREL Tweag, LORIA/INRIA | ||
11:45 22mTalk | [HIW] Building Haskell with Buck2 Haskell Andreas Herrmann Tweag by Modus Create | ||
12:07 22mTalk | [HIW] The JavaScript FFI feature in GHC Wasm backend Haskell Cheng Shao Modus Create |