Click here to Skip to main content
15,886,801 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Java vs. C++ Pin
Mike Dimmick18-Sep-07 9:55
Mike Dimmick18-Sep-07 9:55 
GeneralRe: Java vs. C++ Pin
jhwurmbach18-Sep-07 4:53
jhwurmbach18-Sep-07 4:53 
GeneralRe: Java vs. C++ Pin
Russell'18-Sep-07 5:11
Russell'18-Sep-07 5:11 
GeneralRe: Java vs. C++ Pin
jhwurmbach18-Sep-07 5:25
jhwurmbach18-Sep-07 5:25 
GeneralRe: Java vs. C++ Pin
Russell'18-Sep-07 5:44
Russell'18-Sep-07 5:44 
GeneralRe: Java vs. C++ Pin
El Corazon18-Sep-07 8:22
El Corazon18-Sep-07 8:22 
GeneralRe: Java vs. C++ Pin
jhwurmbach18-Sep-07 8:31
jhwurmbach18-Sep-07 8:31 
GeneralRe: Java vs. C++ Pin
El Corazon18-Sep-07 9:01
El Corazon18-Sep-07 9:01 
jhwurmbach wrote:
We were concerned with the speed of execution, and when the compilers optimisation did not kick in (as it should), I asked "Why?"


how do you know it did not kick in? it may have assumed you needed that code. Some people use hard coded timing loops without external references as timing loops. It all depends on which compiler you use, what options you set, and what assumptions you allow your compiler to use. Knowing what this means to your code is very important. If you, as some people have, used dead-code as a sleep, then you may not want that optimized. Does your compiler have an option to remove unused code? See, it is more than a "magic" compile and it works.


jhwurmbach wrote:
a different algorithm


exactly my point as a matter of fact. If you know your compiler optimizes certain algorithms faster than others, because it is able to understand the logic, you begin adapting your code algorithms to match the compiler without even knowing it. The problem with that is that when you compile the same code on a new compiler, suddenly the performance changes. The reason is either consciously or inadvertently you have tuned the code to match the optimization of that one compiler, not the new one. Knowing the strengths and weaknesses of your own compiler is not a bad thing.

As I said, I understand that if you are not concerned with performance, you don't need to do this. But if you really are concerned with performance, writing code that cooperates with the optimization analysis of the compiler is certainly a good thing.

_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

AnswerRe: Java vs. C++ Pin
Mike Dimmick18-Sep-07 4:19
Mike Dimmick18-Sep-07 4:19 
AnswerRe: Java vs. C++ Pin
Nemanja Trifunovic18-Sep-07 4:46
Nemanja Trifunovic18-Sep-07 4:46 
AnswerRe: Java vs. C++ Pin
El Corazon18-Sep-07 5:00
El Corazon18-Sep-07 5:00 
AnswerRe: Java vs. C++ Pin
bob1697218-Sep-07 6:39
bob1697218-Sep-07 6:39 
GeneralRe: Java vs. C++ Pin
jhwurmbach18-Sep-07 8:33
jhwurmbach18-Sep-07 8:33 
QuestionComplier C2664 Error Pin
Andy20218-Sep-07 3:02
Andy20218-Sep-07 3:02 
QuestionRe: Complier C2664 Error Pin
David Crow18-Sep-07 3:06
David Crow18-Sep-07 3:06 
AnswerRe: Complier C2664 Error Pin
Andy20218-Sep-07 4:11
Andy20218-Sep-07 4:11 
GeneralRe: Complier C2664 Error Pin
David Crow18-Sep-07 4:19
David Crow18-Sep-07 4:19 
GeneralRe: Complier C2664 Error Pin
Andy20218-Sep-07 4:29
Andy20218-Sep-07 4:29 
GeneralRe: Complier C2664 Error Pin
David Crow18-Sep-07 4:34
David Crow18-Sep-07 4:34 
GeneralRe: Complier C2664 Error Pin
Andy20218-Sep-07 4:59
Andy20218-Sep-07 4:59 
QuestionRe: Complier C2664 Error Pin
David Crow18-Sep-07 5:14
David Crow18-Sep-07 5:14 
AnswerRe: Complier C2664 Error Pin
Andy20218-Sep-07 6:10
Andy20218-Sep-07 6:10 
QuestionPrinting Problem Pin
pri_skit18-Sep-07 1:40
pri_skit18-Sep-07 1:40 
QuestionUse MFC in.... Pin
himuskanhere18-Sep-07 1:36
himuskanhere18-Sep-07 1:36 
AnswerRe: Use MFC in.... Pin
nbugalia18-Sep-07 1:41
nbugalia18-Sep-07 1:41 

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.