bobyqa: replace trueloc indexing with allocation-free where/masked sum - #315
pawlenartowicz wants to merge 1 commit into
Conversation
Every y(trueloc(mask)) in fortran/bobyqa/ becomes where(mask) y = ... or sum(..., mask=mask). Same floating-point operations in the same order; trajectories and all internal states are bit-identical to the previous commit. Removes 3-4 heap allocations per call site from the trsbox and geostep hot loops; 1.7x-2.1x faster per solve with gfortran 15 -O3.
|
Thank you for the PR. However,
Thank you. |
Every y(trueloc(mask)) in fortran/bobyqa/ becomes where(mask) y = ... or sum(..., mask=mask). Same floating-point operations in the same order; trajectories and all internal states are bit-identical to the previous commit. Removes 3-4 heap allocations per call site from the trsbox and geostep hot loops; 1.7x-2.1x faster per solve with gfortran 15 -O3.