The implementation of similarity(MatrixRow a, MatrixRow b) has been made faster now because the while loop does no longer have to store the columns two times in the variable.

The implementation of similarity(MatrixRow a, MatrixRow b) has been made faster now because the while loop does no longer have to store the columns two times in the variable.
I think so. Did you test it? There are unit tests you can run.