During one of our lectures we discussed about how one would go about to speed up a program. Here are a few details regarding the topic.
----------------
1. Compiler flags are a great way to try and optimize a program due to their ease and portability.
2. selecting an algorithm to help optimize the code, but the drawback is that it can depend on some architecture for:
- data sizes
- how to arrange in memory
- how accurate are we going to be
3. Using Assembler to optimize code is also an option, however assembler is Not portable at all
Things to consider when looking at a program:
- How is memory laid out
- Timing issues when using multiple threads, causing read and write issues.
Comentários