Ah. . .matrix multiplication. Checking for zeroes will speed you up quite a bit if the matrix is sparse enough. Testing for 0s requires getting two values from memory and two comparisons (or one, with ...