Producing the fastest possible executable

后端 未结 10 2113
滥情空心
滥情空心 2021-02-06 15:55

I have a very large program which I have been compiling under visual studio (v6 then migrated to 2008). I need the executable to run as fast as possible. The program spends most

10条回答
  •  旧巷少年郎
    2021-02-06 16:49

    I agree with what everyone has said about profiling. However you mention "integers of various sizes". If you are doing much arithmetic with mismatched integers a lot of time can be wasted in changing sizes, shorts to ints for example, when the expressions are evaluated.

    I'll throw in one more thing too. Probably the most significant optimisation is in choosing and implementing the best algorithm.

提交回复
热议问题