0
What is code optimization ???
2 Réponses
+ 5
To put that definition into perspective, think about this code:
x = 5
y = 10
a = y + x + 5
b = y + x - 5
Without optimization, y + x would be calculated twice. During the figuring out what is to be assigned to a and once more to figure out b.
With optimization, the compiler looks for things that happen multiple times and tries to only do it once. It also looks for special cases such as divide by 2 as the shift instruction is much faster than the divide instruction.
+ 5
Acording to Wikipedia:
"In computer science, program optimization or software optimization is the process of modifying a software system to make some aspect of it work more efficiently or use fewer resources."