The matrix storage can also copy directly from one sub-matrix to another sub-matrix (Storage.CopySubMatrixTo), so you could copy directly from A to B without extracting the 4 matrices.
It actually does use BlockCopy internally if applicable, although this does not help that much in case of sub-matrices. However, in this case you'll loose a lot already by the conversion from 2D arrays to matrices and back to 2D arrays, since dense matrices use a single (1D) column-major array internally. I assume the 2D arrays are a requirement in your scenario?
It actually does use BlockCopy internally if applicable, although this does not help that much in case of sub-matrices. However, in this case you'll loose a lot already by the conversion from 2D arrays to matrices and back to 2D arrays, since dense matrices use a single (1D) column-major array internally. I assume the 2D arrays are a requirement in your scenario?