matrix operation performance optimization