~/talk

Stack allocation for OCaml

Talkat OCaml 2022 · on Friday, 2022-09-16
links:none on file
name:Leo White
links:none on file
slides:none on file

Adds a modal type extension to OCaml that lets values be allocated on a separate stack when safe, implemented in the compiler and available on GitHub. The system marks bindings as local vs global modes (inferred), allows local returns, and requires no lifetime variables so normal type inference keeps working. Real examples change list iterators to take a local closure and remove per-iteration heap allocations (closure and ref cell), but tail-call restrictions and currying compatibility force code edits in tens of places. The implementation runs and yields measurable allocation reductions.

AI-written summary · about

  1. 0:00Start
  2. 2:44Stack Allocation
  3. 4:23Region Variables
  4. 7:11Global Bindings
  5. 13:52Variable Access Rule
  6. 15:04Double Nested Iteration
  7. 18:25Currying
  8. 20:48Immutable Arrays
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.