← findnix.eu
🎬 watch.ocaml.org watch.ocaml.org

[OCaml'25] Taming the Flat Float Array Optimization: Tracking Separability in the Type System

⏱ 29:56 🌐 watch.ocaml.org

Taming the Flat Float Array Optimization: Tracking Separability in the Type System (Video, OCaml 2025) Diana Kalinichenko, and Richard A. Eisenberg (Jane Street; Jane Street) Abstract: OCaml’s flat float array optimization stores floating-point values directly in arrays rather than through pointers, preventing performance degradation for numerical algorithms. However, this optimization requires that all types be \textit{separable} β€” containing either all float values or none. This restriction prevents certain useful types, such as unboxed existentials and an unboxed version of options. We present the approach taken by OxCaml (OCaml with Jane Street’s extensions) to tracking separability through the type system using a three-valued separability axis. This design enables previously rejected non-separable types while maintaining compatibility with existing code and enabling new optimizations for arrays of known non-float types. Our implementation builds on OxCaml’s kind system but could

β†—https://watch.ocaml.org/w/eAdpqFJRZUjYJjfQoXcda9
watch.ocaml.org
Indexiert von findnix.eu Β· Eigene Seite einreichen