Click here to Skip to main content
15,919,132 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: why no dot h? Pin
Nick Hodapp14-Aug-02 14:36
sitebuilderNick Hodapp14-Aug-02 14:36 
AnswerRe: why no dot h? Pin
Christian Graus14-Aug-02 17:35
protectorChristian Graus14-Aug-02 17:35 
Questionmystery or stupid? Pin
includeh1014-Aug-02 13:56
includeh1014-Aug-02 13:56 
AnswerRe: mystery or stupid? Pin
Nick Hodapp14-Aug-02 14:31
sitebuilderNick Hodapp14-Aug-02 14:31 
GeneralRe: mystery or stupid? Pin
includeh1014-Aug-02 14:36
includeh1014-Aug-02 14:36 
GeneralRe: mystery or stupid? Pin
Christian Graus14-Aug-02 17:37
protectorChristian Graus14-Aug-02 17:37 
AnswerRe: mystery or stupid? Pin
Steen Krogsgaard15-Aug-02 3:30
Steen Krogsgaard15-Aug-02 3:30 
AnswerRe: mystery or stupid? Pin
Philippe Mori15-Aug-02 9:43
Philippe Mori15-Aug-02 9:43 
I think that Visual C++ does some trivial optimisation even in debug builds.

When line 0 is deleted, it is trivial for the compiler to know that line 1 does nothing and the the whole loop is useless.

For the other case (line 1 deleted), I don't see how it can be "optimized" except if intrinsic inline functions are enabled.

The best thing to do is to take a look at the assembler code while debugging. You will see what the compiler has generate.

At first, I would think that the compiler has detected that the loop is useless when timing is really near 0ms.

Probaly when you have both lines, the complexity is higher than what VC will try to optimize...

Philippe Mori
GeneralMemory Allocation :: C/C++ Pin
valikac14-Aug-02 13:27
valikac14-Aug-02 13:27 
GeneralRe: Memory Allocation :: C/C++ Pin
Bill Wilson14-Aug-02 13:36
Bill Wilson14-Aug-02 13:36 
GeneralRe: Memory Allocation :: C/C++ Pin
jmkhael14-Aug-02 13:41
jmkhael14-Aug-02 13:41 
GeneralRe: Memory Allocation :: C/C++ Pin
valikac14-Aug-02 13:50
valikac14-Aug-02 13:50 
GeneralRe: Memory Allocation :: C/C++ Pin
Stuart Dootson14-Aug-02 20:44
professionalStuart Dootson14-Aug-02 20:44 
GeneralRe: Memory Allocation :: C/C++ Pin
Rutger Ellen14-Aug-02 22:07
Rutger Ellen14-Aug-02 22:07 
GeneralRe: Memory Allocation :: C/C++ Pin
valikac15-Aug-02 5:43
valikac15-Aug-02 5:43 
GeneralCHTMLView Pin
Wolfram Steinke14-Aug-02 13:16
Wolfram Steinke14-Aug-02 13:16 
GeneralChanging Font Color Pin
slackboy14-Aug-02 12:57
slackboy14-Aug-02 12:57 
GeneralRe: Changing Font Color Pin
PJ Arends14-Aug-02 13:06
professionalPJ Arends14-Aug-02 13:06 
GeneralDouble Byte Characters in win32 controls. Pin
djrisc14-Aug-02 10:38
djrisc14-Aug-02 10:38 
GeneralDouble Byte Characters in win32 controls. Pin
djrisc14-Aug-02 13:21
djrisc14-Aug-02 13:21 
GeneralRe: Double Byte Characters in win32 controls. Pin
Michael Dunn14-Aug-02 14:57
sitebuilderMichael Dunn14-Aug-02 14:57 
GeneralRe: Double Byte Characters in win32 controls. Pin
djrisc14-Aug-02 20:22
djrisc14-Aug-02 20:22 
GeneralWrapping windows dialogues around old DOS programs Pin
Malcolm Crawford14-Aug-02 10:24
Malcolm Crawford14-Aug-02 10:24 
GeneralLoadLibrary Error Pin
Michael_Petrov14-Aug-02 10:02
sussMichael_Petrov14-Aug-02 10:02 
GeneralRe: LoadLibrary Error Pin
Stephane Rodriguez.14-Aug-02 10:17
Stephane Rodriguez.14-Aug-02 10:17 

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.