Optimization Flashcards
1
Q
How can you alter a program to remove inefficiency?
A
- change algos
- restructure code
- redesign data structures
- refactor code
2
Q
When should you optimize code?
A
- Only when we have a real performance problem
- If the code works, its good enough
- 80-20 rule - 8-% of the program’s executing is spend in 20% of the code
- focus on code that is called the most