Repository activity
40458 results across all weeks
CI: build OCaml 4.13 and 5.0 on ubuntu-latest again
Why
hhugoCI: do not let an OCaml trunk failure cancel the other jobs
On pull requests, fail-fast cancels the whole matrix as soon as a job fails. The 5.6+trunk job can break because of upstream changes (stdlib expected output, ppxlib pin), so mark it continue-on-error.
Jérôme Vouillon (@vouillon)CI: pin Node.js 26, build OCaml 4.13/5.0 on Ubuntu 24.04
Fixes CI failures on master that come from changes in the CI environment, not from the code.
hhugoCI: switch node-version back to latest once Node.js 27 works
What breaks with Node.js 27
hhugoCompiler/JS: signal exceptions by returning a sentinel under a handler
Throwing a JavaScript exception is expensive on V8: most of the cost is Isolate::ComputeLocation, which computes the location of the throw for the message object. On the ocamlc benchmark (--opt 2), the throw path takes about 41% of the run time.
Jérôme Vouillon (@vouillon)Compiler/Wasm: link with our own linker instead of wasm-merge and wasm-metadce
The output is essentially unchanged. Compilation is faster, since wasm-merge and wasm-metadce no longer run: -10% (--opt 1) and -5% (--opt 2) on js_of_ocaml.bc, -35% to -50% on small programs.
Jérôme Vouillon (@vouillon)Compiler/wasm: per-function budget for cloning higher-order functions
Replace the two limits of the cloning pass (functions of at most 300 instructions, at most 4 copies each) with a single budget: a function of size n is cloned at most budget / n times. Small functions such as List.iter can then be cloned for more of the closures they are passed. The budget defaults to 300 instructions, so no clone is larger than before, and …
Jérôme Vouillon (@vouillon)Compiler: avoid a stack overflow when ordering the solver worklist
The worklist of the imperative dataflow solvers is filled in reverse postorder by a recursive depth-first traversal. The graphs can be very deep: when compiling js_of_ocaml.bc, the traversal goes 4,403 nodes deep for the global dead code elimination (515,632 nodes) and 7,346 nodes deep for the liveness analysis of Js_variable_coalescing (a 7,539-node chain).…
Jérôme Vouillon (@vouillon)Compiler: contification of local functions
Turn a local function into blocks of its enclosing function when it is only used as the callee of full applications, all located in the function defining it, and all with the same continuation (all tail calls, or all jumping to the same block with the same arguments, leaving the same exception handler if any; a function applied once always qualifies). Calls …
Jérôme Vouillon (@vouillon)Compiler: jump threading
A block that only tests one of its parameters (possibly after computing the tested value with IsInt, Not, an integer comparison or %direct_obj_tag) is often reached through edges on which the tested value is known: a constant, a block, the condition the predecessor has just tested ([a && b] without -g), or the value a Switch dispatched on. Such an edge is re…
Jérôme Vouillon (@vouillon)Compiler: propagate the value of the variable tested by a conditional
Along the second edge of Cond (x, _, _), x is zero; along the
Jérôme Vouillon (@vouillon)Convert Int_trie slots with Obj.magic, not %identity
Int_trie stores both values and child nodes (arrays) in slots typed private int list, converting with %identity. OxCaml's flambda2 trusts the shape of a value converted with %identity (for int list, an immediate or a block of size 2): with join points (-O2, -O3), the store of a node into a slot in remove_node is dropped as unreachable, so removing a key from…
Jérôme Vouillon (@vouillon)Dead code elimination drops stores that keep values alive for Weak
Hello,
Vincent Balat (@balat)Experiment: benchmark with wasm-opt disabled
Jérôme Vouillon (@vouillon)Experiment: implement exceptions by returning null
Jérôme Vouillon (@vouillon)Fix float formatting to match native
@hhugo: Cc @let-def
Jérôme Vouillon (@vouillon)Improved recursive inlining
We do more at each iteration.
Jérôme Vouillon (@vouillon)Introcaml support in Wasm
Jérôme Vouillon (@vouillon)Manual: update the performance charts, add Wasm_of_ocaml
Updates the charts of the performance page, last generated in November 2022, and adds Wasm_of_ocaml.
hhugoMore Wasm optimizations
Jérôme Vouillon (@vouillon)