Features
-
The compiler and runtime no longer emit holey arrays for dead block fields or runtime allocations. ocamlc runs 2–4% faster with 4% lower peak memory; fannkuch_redux improves 17%. #2609 (merged, @vouillon)
-
The default
switch_sizefor code generation rises from 60 to 256 cases; switches whose case values span more than 1000 are also split. QuickJS is the only engine measured slower. #2612 (merged) -
caml_bytes_get/set{16,32,64}unow read and write the underlyingUint8Arraydirectly instead of per-byte calls. The digestif benchmark, which stores state in bytes, was twice as slow before. #2608 (merged, @vouillon)
Compatibility and Releases
- A draft
portintflag representsintasi31 | ref to i64andnativeintasi64in Wasm output, making integers wire-compatible with 64-bit native OCaml. No stable API yet. #2617 (open draft, @rricard)
Fixes
-
With GADTs, a variable typed as an integer could be used as a reference in dead code, producing an invalid
ref.castor call on an i32 in Wasm output. The compiler now boxes such variables. #2615 (merged, @vouillon) -
Empty float arrays in Wasm output (constants, recursive dummies,
Float.Array.concat []) carried tag 254 instead of 0, diverging from native behaviour. The tag is now 0. #2594 (merged, @smjleo) -
Calls to functions stored in blocks are emitted as
M[i](x)instead ofM[i].call(null, x), restoring V8 inlining. Separate-compilation benchmarks improve 6–19%; whole-program--opt 3ocamlc is ~2% slower on node 22. #2613 (open, @hhugo)