Multiplying 2 arrays as fast and effective as possible with java and c++