|optimization using profiling email@example.com (1998-11-12)|
|Re: optimization using profiling firstname.lastname@example.org (1998-11-15)|
|Re: optimization using profiling email@example.com (John Williams) (1998-11-15)|
|Re: optimization using profiling firstname.lastname@example.org (Joachim Durchholz) (1998-11-15)|
|Date:||12 Nov 1998 02:34:53 -0500|
|Organization:||Deja News - The Leader in Internet Discussion|
Sun's C++ compiler (SC4.2) has an optimization level -O5 which is described :
-O5: Generates the highest level of optimization. Uses optimization algorithms
that take more compilation
time or that do not have as high a certainty of improving execution time.
Optimization at this level is more
likely to improve performance if it is done with profile feedback.
-xprofile=p Collects data for a profile or uses a profile to optimize. This
option causes execution frequency data to be collected and saved during the
execution. The data can be used in subsequent runs to improve performance.
How? What can be done after profiling that can't be done without it ?
To get a real improvement, I guess I must run my application to cover
ALL the possibilities (all branches in code), or I'll get worse
performance, since the compiler will think that some code is never or
almost never being executed, right?
[There are a lot of optimizers that can feed back profiling info,
mostly about the relative frequency that parts of the program are
executed. But profiling isn't about code coverage, you need to profile
the program doing what it does to give the optimizer useful info to
guide it. -John]
Return to the
Search the comp.compilers archives again.