Liking cljdoc? Tell your friends :D

mapdag.runtime.jvm-eval

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).
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`).
raw docstring

case-able-key?clj

(case-able-key? k)
source

compile-defaultclj

(compile-default graph)
source

compile-graphclj

(compile-graph {:as _opts
                output-keys :mapdag.run/output-keys
                input-keys :mapdag.run/input-keys
                :or {input-keys false output-keys false}}
               graph)

Performs Ahead-Of-Time compilation of the supplied mapdag graph. Uses clojure.core/eval.

When known in advance, the available input keys and requested output keys may be supplied, allowing for an even more optimized computation.

Returns a function which accepts an inputs-map and (when not supplied AOT) output-keys, and returns a map.

Performs Ahead-Of-Time compilation of the supplied mapdag graph. Uses `clojure.core/eval`.

When known in advance, the available input keys and requested output keys may be supplied,
allowing for an even more optimized computation.

Returns a function which accepts an inputs-map and (when not supplied AOT) output-keys,
and returns a map.
sourceraw docstring

compile-with-known-input-and-outputsclj

(compile-with-known-input-and-outputs graph input-keys output-keys)
source

compute-fn-threw-exclj

(compute-fn-threw-ex graph step-name deps-values causing-err)
source

dep-cycle-exclj

(dep-cycle-ex step-name)
source

missing-step-or-input-exclj

(missing-step-or-input-ex step-name)
source

static-steps-planclj

(static-steps-plan graph input-keys output-keys)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close