Imagine you need to go buy groceries. You make a list of what you need, then you go down every aisle looking for those items until you have traversed the entire store. Easy right? But wait, this isn’t optimal. You know some aisles don’t contain any items you need from your list. So you can optimize your path by skipping the aisles that don’t contain anything on your list.
Optimizing a program is similar. You are looking for places where you are doing more work than you need to and find ways to skip over unnecessary work. One example is object culling. Instead of drawing everything in the game world, only draw the things in front of the player’s camera. You can optimize this even further by only drawing things in front of the players camera that are not completely occluded by another object! There are tons of little tricks like this that can make a program run faster or use less memory.
Latest Answers