Click here to Skip to main content
15,913,941 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCListView Pin
schoni11-Jun-03 8:32
schoni11-Jun-03 8:32 
Generalcapturing embedded control messages Pin
will138311-Jun-03 7:33
will138311-Jun-03 7:33 
Generallow leve audio api Pin
Gaurs11-Jun-03 7:10
Gaurs11-Jun-03 7:10 
GeneralRe: low leve audio api Pin
Mike Nordell12-Jun-03 8:33
Mike Nordell12-Jun-03 8:33 
GeneralProblems with ADO Connection to ORacle using VC Pin
RK_200011-Jun-03 5:44
RK_200011-Jun-03 5:44 
QuestionWho Can give me a rtf file format analyse example? Pin
zhangyifei11-Jun-03 5:41
zhangyifei11-Jun-03 5:41 
AnswerRe: Who Can give me a rtf file format analyse example? Pin
Dominik Reichl11-Jun-03 6:03
Dominik Reichl11-Jun-03 6:03 
AnswerRe: Who Can give me a rtf file format analyse example? Pin
Dominik Reichl11-Jun-03 6:06
Dominik Reichl11-Jun-03 6:06 
AnswerRe: Who Can give me a rtf file format analyse example? Pin
Mike Nordell12-Jun-03 8:36
Mike Nordell12-Jun-03 8:36 
GeneralRe: Who Can give me a rtf file format analyse example? Pin
zhangyifei15-Jun-03 7:27
zhangyifei15-Jun-03 7:27 
GeneralFastest code Pin
doctorpi11-Jun-03 5:39
doctorpi11-Jun-03 5:39 
GeneralRe: Fastest code Pin
valikac11-Jun-03 6:26
valikac11-Jun-03 6:26 
GeneralRe: Fastest code Pin
doctorpi11-Jun-03 6:44
doctorpi11-Jun-03 6:44 
GeneralRe: Fastest code Pin
Maximilien11-Jun-03 6:51
Maximilien11-Jun-03 6:51 
GeneralRe: Fastest code Pin
doctorpi11-Jun-03 6:56
doctorpi11-Jun-03 6:56 
GeneralRe: Fastest code Pin
David Crow11-Jun-03 7:27
David Crow11-Jun-03 7:27 
GeneralRe: Fastest code Pin
doctorpi11-Jun-03 7:37
doctorpi11-Jun-03 7:37 
GeneralRe: Fastest code Pin
Mike Nordell12-Jun-03 8:44
Mike Nordell12-Jun-03 8:44 
GeneralRe: Fastest code Pin
doctorpi12-Jun-03 10:59
doctorpi12-Jun-03 10:59 
GeneralRe: Fastest code Pin
jhwurmbach11-Jun-03 23:32
jhwurmbach11-Jun-03 23:32 
GeneralRe: Fastest code Pin
jbarton11-Jun-03 7:51
jbarton11-Jun-03 7:51 
If possible, you should run your code inside a profiler. The design of your program (and the algorithm choices made for how to process data) will affect how fast the program runs, but you shouldn't unnecessarily make changes to code that is already debugged and running correctly.

What you want to do is identify what areas of the code are using the most cpu time, and concentrate any effort in optimizing to those areas that actually make a difference. Even with a lot of experience with what code sequences are slow versus fast, it is a waste of effort to fix parts that only take a small amount of the total time (even if they are written using a slow algorithm). This is where the profiler will help. Use it to find the areas of your program which are taking the largest amount of time to execute, and concentrate any effort on speedups to those areas. (If one part of the program is taking 90% of the time, any effort spent on improving other parts of the program can only get you at most a 10% improvement).

As far as using tricks - I would avoid any "tricky" sequence of code. You are more likely to get it wrong, and even if you get it right, it makes future maintenance more difficult.

For compiler options, I would just choose whatever optimizations match the most likely target machine for the program.

Best regards,
John
GeneralRe: Fastest code Pin
doctorpi11-Jun-03 7:56
doctorpi11-Jun-03 7:56 
GeneralRe: Fastest code Pin
jbarton11-Jun-03 8:43
jbarton11-Jun-03 8:43 
GeneralRe: Fastest code Pin
basementman12-Jun-03 6:46
basementman12-Jun-03 6:46 
QuestionHow do you initialize a structure with a CPoint member? Pin
kleft11-Jun-03 5:38
kleft11-Jun-03 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.