~/talk

Mixed Blocks: Storing More Fields Flat

Talkat OCaml 2024 · on Saturday, 2024-09-07
links:none on file
slides:none on file

Extends OCaml’s runtime to allow mixed blocks where some fields are stored flat (numeric payloads inline) while the GC scans a prefix only, encoded by stealing one header bit to record scan-prefix length (supports up to 255 scanned words). Implemented in Jane Street’s flambda-backend branch, it keeps object size unchanged, supports int64/int32/float/nativeint, and yields modest real-world speedups (~1–2%). Trade-offs: unscanned fields must be a suffix and it disables generic comparison.

AI-written summary · about

  1. 0:00Introduction
  2. 1:50Memory layout vs performance
  3. 2:31OCaml value representation
  4. 4:40Mixed blocks concept
  5. 6:05Limitations of current garbage collector tags
  6. 7:08Mixed blocks design
  7. 8:34Header word encoding
  8. 10:21Scan prefix advantages
  9. 12:30Mixed blocks limitations
  10. 13:54Comparison & generic ops
  11. 14:37Explicit mixed blocks syntax
  12. 16:25Microbenchmarking
  13. 17:06Indirection impact
  14. 17:27Non-scanned fields
  15. 18:10Q&A
~/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.