The checker ran a separate check-walk that re-inferred each argument's subtree AND recursed into it — quadratic in expression nesting. Fold the diagnostic emission into `infer` itself (gated by a checking? flag, off during the optimization fixpoint): one O(n) walk that both types and checks. Removes check-walk entirely; check-form now drives infer. This is a cleanup and removes the deep-nesting blowup, but it does NOT make warn-by-default cheap: on a real 360-line file the checker still adds ~2.6x compile time (277ms -> 720ms). That cost is the structural inference pass itself, which checking inherently requires — not redundancy. A cheap default-on path would need either piggybacking on the inference direct-link already runs, or a lighter scalar-only checker inference. Gate green, type-check tests pass. |
||
|---|---|---|
| .. | ||
| clojure/core | ||
| jolt | ||