¡@

Home 

c++ Programming Glossary: optimising

C++ refactoring: conditional expansion and block elimination

http://stackoverflow.com/questions/10102610/c-refactoring-conditional-expansion-and-block-elimination

read from shared memory so the compiler is not currently optimising anything away behind the scenes. Although the resultant code..

Is returning a std::list costly?

http://stackoverflow.com/questions/1092561/is-returning-a-stdlist-costly

l Often once the compiler has finished inlining and optimising the code is more or less identical. The advantage of this is..

Optimisation of division in gcc

http://stackoverflow.com/questions/1121791/optimisation-of-division-in-gcc

int such that the compiler can discard the wrapping when optimising The goal is that WrappedInt will be a policy based template...

Can template polymorphism be used in place of OO polymorphism?

http://stackoverflow.com/questions/1213366/can-template-polymorphism-be-used-in-place-of-oo-polymorphism

categorically wrong with it. Supposing that you were optimising to avoid function call overhead then it might be an improvement..

How do I prevent my 'unused' global variables being compiled out?

http://stackoverflow.com/questions/1229430/how-do-i-prevent-my-unused-global-variables-being-compiled-out

a factory in C . Unfortunately I think the compiler is optimising out the 'unused' objects which are meant to do the useful work..

Would you use num%2 or num&1 to check if a number is even?

http://stackoverflow.com/questions/1949271/would-you-use-num2-or-num1-to-check-if-a-number-is-even

disappears when the compiler has finished inlining and optimising. A decent C compiler can handle arithmetic with constant values..

Optimizing away a “while(1);” in C++0x

http://stackoverflow.com/questions/3592557/optimizing-away-a-while1-in-c0x

have pessimised the rare case infinite loops in favour of optimising the more common case noninfinite but difficult to mechanically..

Negative NaN is not a NaN?

http://stackoverflow.com/questions/3596622/negative-nan-is-not-a-nan

embarrassing. The reason the compiler GCC in this case was optimising away the comparison and isnan returned false was because someone..

Performance of dynamic_cast?

http://stackoverflow.com/questions/4050901/performance-of-dynamic-cast

to ensure the compiler isn't giving you false results by optimising away multiple dynamic casts on the same pointer so use a loop..

Using Assembly Language in C/C++

http://stackoverflow.com/questions/4202687/using-assembly-language-in-c-c

better efficiency of code than that generated by a good optimising compiler and they're overwhelmingly likely to do worse. So use..

'for' loop vs Qt's 'foreach' in C++

http://stackoverflow.com/questions/771008/for-loop-vs-qts-foreach-in-c

only if you find an actual performance issue . Time spent optimising before you've finished the functionality and can properly profile..

how to achieve 4 FLOPs per cycle

http://stackoverflow.com/questions/8389648/how-to-achieve-4-flops-per-cycle

but on my system cl O2 does a much better job at low level optimising operations for my system and achieves close to peak performance..