[PLAT-6640]
[PLAT-6723] getModifiedCurvatureMatrix in NonLinearLeastSquare and NonLinearLeastSquareWithPenalty is slow