~/talk

Parallel Sequences in Multicore OCaml

Talkat OCaml 2023 · on Saturday, 2023-09-09· [concurrency]
links:none on file
slides:none on file

An OCaml 5.0 multicore library that exposes list-like tabulate/map/reduce/scan/flatten/filter uses an opaque array underneath, domainslib for scheduling, and a small C stub to allocate uninitialized blocks; it achieves good speedup on 2000×2000 block matrix multiply with 100×100 blocks and on a web index built from 1,000,000 pages (~800 MB), and an in-place scan removes array.copy to scale on an array of 1,000,000,000 integers; main costs are domainslib’s scheduler choices and sequential array initialization plus GC marking quirks.

AI-written summary · about

  1. 0:00Parallel sequences intro
  2. 1:27Core parallel ops
  3. 2:30Shared memory in Multicore OCaml
  4. 3:33Tabulate with domains
  5. 6:21Array init challenges
  6. 7:03Reduce and scan algorithms
  7. 8:47Flattening nested seqs
  8. 9:29Parallel filtering
  9. 10:31Block matrix perf
  10. 11:35Web indexing
  11. 12:38Domainslib limitations
  12. 13:40OCaml runtime init
  13. 14:26Array creation overhead
  14. 15:50In-place operations for better performance
  15. 16:54Array of arrays workaround
  16. 17:36Garbage collection considerations
  17. 17:57Conclusion
~/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.