If you're new to this area, I would first start by understanding which profiling tools you can use depending on the OS, languages and systems involved.
Even if your system is not C++, I've always enjoyed this talk and the subsequent discussion which tackles some of the problems associated with some programming practices and the impact on performance.
CppCon 2014: Mike Acton 'Data-Oriented Design and C++' https://youtu.be/rX0ItVEVjHc