3 ms·
The idea here is that it appears that you are limited by the CPU and want to make things faster. When doing optimized code, the question "should I optimize for
by GuB-42 10y ago
The idea here is that it appears that you are limited by the CPU and want to make things faster.
When doing optimized code, the question "should I optimize for memory or for computing?" comes up often. Should I cache results? Should I use a more complex data structure in order to save memory or improve locality?
IPC is a good indicator on how you should tackle the problem. High IPC means you are may be doing too many calculations, while low IPC means that you should look at your memory usage. BTW, most of the time, memory is the problem.