Thicket thicket
ocaml
REPOS 1

Core covers the OCaml compiler and language RFCs.

W28.2026 · 6–12 Julocaml/ocaml

Features

  • Configurable domain stack size (merged): New OCAMLRUNPARAM=S=<size> setting controls the stack allocated when spawning a domain via Domain.spawn. Addresses segfaults from large C stack frames in spawned domains. #14860

  • Atomic.compare_and_exchange (open): Proposed stdlib addition Atomic.compare_and_exchange : 'a t -> expected:'a -> set:'a -> 'a, implemented as a C primitive (~25% faster than an OCaml retry loop under contention). #14912

Performance

  • Inline full-application caml_apply (open): Full (non-partial) function calls bypass the caml_apply trampoline. Benchmarks show ~25% runtime reduction on function-call-heavy code and 1–4% instruction-count reduction across coq-bench. Code size increases ~0.56%. #14925

  • arm64 store-release for indexed stores (open): Replaces dmb ishld; str with stlr/stlur for aligned word stores on arm64. 4×–50× faster on FEAT_LRCPC2 cores; configure auto-detects and falls back to the barrier on Cortex-A53/A72. New -flrcpc2/-fno-lrcpc2/-fbarrier-store/-fstore-release options. #14922

Fixes

  • Sys.file_exists on Windows (merged): Replaced stat_os (which uses GetFileInformationByName) with GetFileAttributes in the runtime. Fixes a Windows 11 24H2 kernel bug where Sys.file_exists returned incorrect results depending on another process's CWD. #14919

  • Filename colon handling on Windows (merged): Filename.concat and Filename.dirname now treat : strictly as a volume separator. Filename.concat "C:\\Foo:" "bar" yields C:\Foo:\bar instead of C:\Foo:bar. Targeted for 5.6 only. #14916

  • Typing performance regression from keep-expansion (open, two PRs): Eliding the occurs-check for freshly-instantiated type variables reduces compilation of the js_of_ocaml reproducer from ~5 min to ~5 s. A companion change checks path equivalence modulo module aliases, further reducing the same file to ~170 ms. #14913, #14927

Compatibility

  • Functional updates of atomic records (open): { r with j } on a record with [@atomic] fields compiles to a non-atomic load, silently violating the atomicity contract. The plan is to forbid such implicit loads (matching the existing restriction on pattern matching), which would break code that relies on the current behaviour. #14918