Parent: #478. Related: #479 #480 #482 #483 #484 #485 #487 #488.
Several current losses share low-level primitives: dense dot products, squared distances/RBF kernels, feature/class reductions, centroid accumulation and sample partitioning. Audit whether estimator implementations duplicate slower scalar versions instead of using one optimized primitive layer.
Deliverables: call-site inventory; microbenchmarks by shape/layout; contiguous/strided variants; allocation/copy audit; vectorization evidence; shared implementations where semantics match; estimator-specific fallbacks only when justified.
Acceptance: every canonical hot loop maps to an identified primitive or documented estimator-specific kernel; duplicated implementations are eliminated where possible; primitive benchmarks become regressions; fixes can be attributed back to affected estimator issues.
Parent: #478. Related: #479 #480 #482 #483 #484 #485 #487 #488.
Several current losses share low-level primitives: dense dot products, squared distances/RBF kernels, feature/class reductions, centroid accumulation and sample partitioning. Audit whether estimator implementations duplicate slower scalar versions instead of using one optimized primitive layer.
Deliverables: call-site inventory; microbenchmarks by shape/layout; contiguous/strided variants; allocation/copy audit; vectorization evidence; shared implementations where semantics match; estimator-specific fallbacks only when justified.
Acceptance: every canonical hot loop maps to an identified primitive or documented estimator-specific kernel; duplicated implementations are eliminated where possible; primitive benchmarks become regressions; fixes can be attributed back to affected estimator issues.