Producing the fastest possible executable

后端 未结 10 2095
滥情空心
滥情空心 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:52

    You have three ways to speed up your application:

    1. Better algorithm - you've not specified the algorithm or the data types (is there an upper limit to integer size?) or what output you want.

    2. Macro parallelisation - split the task into chunks and give each chunk to a separate CPU, so, on a two core cpu divide the integer set into two sets and give half to each cpu. This depends on the algorithm you're using - not all algorithms can be processed like this.

    3. Micro parallelisation - this is like the above but uses SIMD. You can combine this with point 2 as well.

提交回复
热议问题