Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP versus C++
Message
From
28/10/2003 17:04:17
 
 
To
28/10/2003 16:02:23
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00842594
Message ID:
00843827
Views:
15
>>I don't know, but it seems that it is generally assumed that a C++ 'optimizer' always successfully speeds up code. I really wonder about that. I've also NEVER done C++ code, much less use an optimizer for it.
>>
>>I could see, for instance, C++ 'basic code' possibly having lots of extra code generated to handle a variety of circumstances and an optimizer (now knowing the exact context of things) simply stripping out extraneous code not relevant to the situation.
>>
>
>I don't use C++ myself, just a very small one *g*. I just heard that the optimizer does it's job, although maybe not always succesful
>
>
>>In such a case the code would no doubt run faster than the same code not 'optimized', but I think the "magic" of optimization probably doesn't extend to 'internally rewriting the programmer's code to run as fast as possible'.
>>
>>cheers
>
>I really don't know how the optimization does it job. Just some thoughts, maybe it has an internal table to machine instruction of how much time the processor will take for each code. Does it generate a delay/stall for processor. Based on that it generate the fastest instruction. Just some thoughts :-)

Well I'd be mightily p*ssed-off if it was something like that because if it already 'knows' which is fastest why wouldn't it use that in the first place???

>
>Regards
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform