posted 2 weeks ago
It is all of the above: data structures, algorithms, hardware, etc. Moreover getting good performance for an algorithm is understanding each of these aspects and how they interact. It is the combination of these parts. You can drastically slow down a good algorithm by using the wrong data structure. Or your data structure can be inefficient with respect to the way the hardware access data. To get the best performance you have to choose these parts to work together.