Okay so optimization is all about making things run faster with less resources. And so the way it’s done in practice usually follows some steps
1. Run the code
2. While the code is running, a different program [called a profiler] measures things and keeps track of stuff (like how much CPU is being used, by this line of code or how much memory does this map need to be loaded).
3. After the code is finished running, all of those measures are combined into basically a list sorted by how intensive something is
4. Then as a programmer you look at that list, and you look at the things that are intensive and then you go into your bag of tricks to try and make it faster
Latest Answers