How does game “optimization” work? Are people sitting there changing lines of code to more “optimal” ones? What is “optimized”?

2.05K views

The recent The Last of Us for PC made me realize I had no idea what’s meant by “optimizing” a game.

Same with optifine in Minecraft improving performance. How do these things work to just make games use fewer resources?

In: 158

105 Answers

Anonymous 0 Comments

algorithmic problems (programming) can be solved in a number of ways, to achieve the same result. some run faster, some run slower. this is direct consequence of how the silicone is built and organized. say, you perform an operation using one complicated instruction, that takes many CPU cycles to complete. BUT – you can achieve the same result by breaking it down into more steps, that in total will run *faster* that the single, complicated instruction. this is more/less what code optimization is.

p.s. this is also the reason why CPU realm is divided into two contradictory approaches. ever heard of [RISC](https://en.wikipedia.org/wiki/Reduced_instruction_set_computer) vs. [CISC](https://en.wikipedia.org/wiki/Complex_instruction_set_computer)? this is exactly the same problem, but in context of silicon design and code execution approach. either one complex instruction to do something, or set of simple instructions to do exactly the same thing, but differently.

You are viewing 1 out of 105 answers, click here to view all answers.