Small matrices and shared checks

Remove repeated checks rather than special-case small inputs

The newest change reduced the first-step penalty on 8×8 and reversed it on 32×128 in a synthetic follow-up. The same cleanup shortened the archived application suite by 2.21%.

What slowed down

When a good warm start already passed the first check, there was no iteration to save. The validation cost was then visible: in a synthetic 1,000-call stream with nearly every solve finishing on its first update, stock versus the first warm-start candidate took 29.5 versus 41.6 ms on 8×8, and 44.7 versus 50.7 ms on 32×128.

What changed mathematically

We reused the minimum of each marginal to test both positivity and the eligibility threshold, avoided an unnecessary temporary array for the log-seed bound, and evaluated the L2 residual directly on the real vector. This is an implementation cleanup, not a new mathematical error criterion. It did not change the requested tolerance, where the solver checks, or which inputs are eligible. It also does not route every small matrix back to stock, which would lose gains when the initial guess needs more updates.

Matched follow-up and broader results

In the separate 1,000-call follow-up, 32×128 took 42.16 ms with the revised check code versus 46.58 ms with stock. The remaining 8×8 gap narrowed from 12.75 to 1.05 microseconds per call within that follow-up. This is a controlled synthetic regression, not a measured production bottleneck.

Application suitePrevious 0.3 (ms)Integrated (ms)Time saved
MNIST, 900 pairs × 3828.00805.192.75%
MNIST, 625 pairs × 3560.83543.863.03%
RGB palettes, 64 calls628.84615.272.16%
Fixed cost, 36 calls41.9940.543.45%
Point-cloud terminal windows, 32 frames23.2222.323.86%
graspologic alignment, 400 calls663.28654.641.30%

The table compares the integrated candidate 66ce7cc directly with 0460680, not with stock POT. Values are sums of setting-level medians over 12 order-balanced single-thread trials. Across 168 archived application settings elapsed time fell 2.21% in aggregate; two settings that were initially more than 3% slower did not retain that difference on retest. The integrated entry point returned bit-identical plans and the same residuals and warnings across 5,739 calls in 186 validation settings. The six numerical-edge fixtures took 0.76% longer in aggregate, so the improvement is not universal.