Differential
moonlight-differential · a guide by Fable
Incremental computation asks a smaller question than recomputation: when an input changes by Δx, what changes in Q(x)? This flower is a keyed join. Circles and diamonds are its two input relations, each inward filament is support, and every central petal is one materialized output row. Every state below was emitted from the real circuit.
Four engine states, held in turn. Gold inserts; rose retracts. One row is replaced and another arrives, so only six petals answer—even though the whole view contains thirty-four.
Both paths finish at the same flower. Recompute relights every support path; the derivative carries only the local disturbance. The equality is checked on the weighted rows before either panel is allowed to exist.
Whole-program recomputation revisits all 34 final rows and all 68 support filaments.
Incremental maintenance touches 6 changed rows and 12 support filaments; the final 34-petal bloom is identical.
The same input port receives an insertion and its retraction in one batch. Signed support collapses to zero before the join runs: the sparks meet at the rim, and nothing reaches the flower.
Feldera's Rust dbsp crate is the reference, not a straw figure. Canonical serialized outputs were diffed byte-for-byte before timing. On the pinned single-worker trace lanes below, Moonlight's dense Haskell path wins raw; generic collection construction still loses, so this is a narrow kernel result rather than a pantomime victory over Feldera's whole SQL platform.



