Reference implementation for executing mapdag Graphs - a portable interpreter.
Reference implementation for executing mapdag Graphs - a portable interpreter.
AOT-compilation of graphs on the JVM, improving performance by leveraging JVM-specific code generation (via clojure.core/eval
) and primitive values.
Compared to the reference mapdag interpreter, addresses the following sources of execution overhead:
:mapdag.step/compute-fn
(via clojure.core/apply
). This implementation generates arity-aware code.:mapdag.step/compute-fn
), impeding JIT optimization. This function eschews this by generating code which defines one function per step, and does static dispatch on the keys (using clojure.core/case
).AOT-compilation of graphs on the JVM, improving performance by leveraging JVM-specific code generation (via `clojure.core/eval`) and primitive values. Compared to the reference mapdag interpreter, addresses the following sources of execution overhead: 1. Dynamic argument passing to the `:mapdag.step/compute-fn` (via `clojure.core/apply`). This implementation generates arity-aware code. 2. Map-based navigation. This implementation generates code that navigates the graph through primitive array lookups. 3. Megamorphic JVM call sites (when calling the `:mapdag.step/compute-fn`), impeding JIT optimization. This function eschews this by generating code which defines one function per step, and does static dispatch on the keys (using `clojure.core/case`).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close