What makes performing matrix multiplication using optimized libraries like so much faster than doing manually in 2 for loops?

167 views

Assuming the same language is done for both, like C++’s <vector> and just a plain C++ implementation.

In: 1

3 Answers

Anonymous 0 Comments

One optimization that can make a difference is making sure that you lay out and process your data in an order that is cache-friendly. You would want to try to always access data that is close together in memory, so that you’re using cached data instead of loading from RAM each time. Even the order of the for loops can affect this

You are viewing 1 out of 3 answers, click here to view all answers.