Andre Kostur wrote:
swathi <ax*****@gmail.comwrote in news:1180451684.020073.20780
@g37g2000prf.googlegroups.com:
>What are the best methods to do C,C++ code optimization manually ?
I has gone though some links sill not satisfied.
Can any one send me best optimization links
Measure, measure, measure. Use some sort of profiling tool to find
out where your code is _actually_ too slow. Then look at why that
code would be too slow and fix it. Usually by changing algorithms.
The usual spiel about what to do after you measure, is "prevent extra
work from being performed" and "cache everything you can" and "use
lookup tables everywhere". When none of those are possible (i.e. they
have all been already applied), rearrange your objects in memory to
reduce CPU cache misses and page faults. Oh, and one more is "do all
work when the user is not looking", i.e. in the "background". Good
luck!
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask