optimized reading dense double and float matrices