Skip to content

~8x per-iteration CG slowdown since cvx-linalg operator adoption (#71) #72

Description

@tschm

Benchmarked on the paper's S&P 500 problem (n=494, T=1213, LW alpha=0.5, scipy 1.17 / numpy 2.4, Apple M4 Pro), best of 3:

rev solve_cg inner iters
d1a15b6 (parent, 2026-07-01) 0.0058 s 82
10bbfdf (#71, 2026-07-02) 0.0475 s 82

Identical iteration counts, ~8x wall clock: the per-matvec cost went from ~35 us to ~290 us, i.e. Python-level overhead in the new FactorOperator/SumOperator path rather than any algorithmic change. Without shrinkage the effect is ~16x (684 iters: 0.012 s -> 0.19 s). This currently gates regenerating the tables of the minvar paper (Jebel-Quant/mean_variance_solvers PR #19); the paper's experiment scripts are pinned to d1a15b6 until this is fixed.

Repro: MinVarProblem(R, alpha=0.5, target=lam_bar*I).solve_cg() on the committed sp500 parquet from mean_variance_solvers/experiment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions