Severity: Medium (performance)
NondominatedRunSurface.__post_init__ redundantly recomputes the full frontier that from_records just computed, plus a fully redundant O(F·N) deep-equality membership check that's already implied by the frontier-equality check that follows.
Location — src/variopt/artifacts/terminal.py:673-683 (post_init) vs from_records at line 748
Measured: N=2000 all-nondominated records → 5.95s to construct one surface (Python-level pairwise dominates_objective_scores, executed roughly 3x the necessary amount). N=10k would take minutes.
Fix direction
Pass a "prevalidated" marker from from_records to skip re-verification when constructed through the trusted path (mirroring the _validated_refinement_pairs identity-cache pattern already used for refinements elsewhere in the same module), delete the redundant membership loop, and hoist the double zip in dominates_objective_scores into a single pass.
Severity: Medium (performance)
NondominatedRunSurface.__post_init__redundantly recomputes the full frontier thatfrom_recordsjust computed, plus a fully redundant O(F·N) deep-equality membership check that's already implied by the frontier-equality check that follows.Location —
src/variopt/artifacts/terminal.py:673-683(post_init) vsfrom_recordsat line 748Measured: N=2000 all-nondominated records → 5.95s to construct one surface (Python-level pairwise
dominates_objective_scores, executed roughly 3x the necessary amount). N=10k would take minutes.Fix direction
Pass a "prevalidated" marker from
from_recordsto skip re-verification when constructed through the trusted path (mirroring the_validated_refinement_pairsidentity-cache pattern already used for refinements elsewhere in the same module), delete the redundant membership loop, and hoist the doublezipindominates_objective_scoresinto a single pass.