Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP versus C++
Message
De
29/10/2003 07:28:15
 
 
À
29/10/2003 04:12:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00842594
Message ID:
00843982
Vues:
21
Thanks Neil.

AlD supplied a link that was extremely enlightening about the issue. I certainly was under-playing the capabilities of C++ optimization!

Jim

>Jim,
>
>Optimisation is not as simple as replacing a byte sized opcode with words and so on an so forth. Look at the following list of optimisations most modern C++ compilers can perform.
>
>global register allocation
>instruction scheduling
>register variable detection
>common subexpression elimination
>dead-code elimination
>variable renaming
>copy propagation
>constant propagation
>strength reduction-induction variable
>tail recursion elimination
>software pipelining and vectorisation
>
>The optimiser has to use a number of strategies to work out best plan, this includes generating profiling information regarding common branch targets, function call frequency and dynamic loop iterations counts. Depending on the compiler you can also provide "hints" to aid in optimisation strategies such as loading of the instruction pipeline or data into the cache.
>
>An common example of where the optimiser will not be able to do its job is the use of registers for the parameter list. Registers are a finite resource, passing in lots of parameters and expecting the compiler to be able to use registers is just not going to happen, however, pass in a pointer to a structure as a single parameter and the optimiser can help you.
>
>Regards
>Neil
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform