avoid expensive matrix update

Merged Christopher Tenter requested to merge StateMatrixUpdate into master

profiling showed that update_matrices has a huge impact on performance. It's better to avoid updating the forward and backward transformations and computing them on the fly instead.

Merge request reports