¡@

Home 

c++ Programming Glossary: optimisations

Dynamically allocated arrays or std::vector

http://stackoverflow.com/questions/1071674/dynamically-allocated-arrays-or-stdvector

C comtainers it's important to enable most compiler optimisations. Several of my own answers on SO have fallen foul of this for..

Accessing inactive union member - undefined?

http://stackoverflow.com/questions/11373203/accessing-inactive-union-member-undefined

is undefined behaviour. This has implications for the optimisations allowed to be performed on such a program as the implementation..

Is signed integer overflow still undefined behavior in C++?

http://stackoverflow.com/questions/16188263/is-signed-integer-overflow-still-undefined-behavior-in-c

behaviour of signed arithmetic overflow is used to enable optimisations for example the compiler can assume that if a b then a 1 b also..

C++ class, its base class and circular include includes

http://stackoverflow.com/questions/1655096/c-class-its-base-class-and-circular-include-includes

has been included it's still doing work even if it has optimisations for guards pragmas. You do need to have some understanding of..

switch case vs if else [duplicate]

http://stackoverflow.com/questions/195802/switch-case-vs-if-else

there's nothing stopping the compiler from doing the same optimisations on the same code converted into if else. So on a good compiler..

Stripping linux shared libraries

http://stackoverflow.com/questions/2088409/stripping-linux-shared-libraries

std allocator private_struct ~vector NB With optimisations on you'll need to make sure the vector is actually used so the..

pure/const function attributes in different compilers

http://stackoverflow.com/questions/2798188/pure-const-function-attributes-in-different-compilers

Given that information the compiler can do some additional optimisations. Example for GCC float sigmoid float x __attribute__ const float..

Is there “magic” in the STL? [closed]

http://stackoverflow.com/questions/3573768/is-there-magic-in-the-stl

to compilers to improve the STL I'm thinking about various optimisations but otherwise no you could write the entire STL if you really..

Using Assembly Language in C/C++

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

the CPU to an exact register still allowing such optimisations but it's the only inline assembly I've ever seen that address..

Accessing static member through invalid pointer: guaranteed to “work”?

http://stackoverflow.com/questions/5248877/accessing-static-member-through-invalid-pointer-guaranteed-to-work

to push the invalid this pointer onto the stack with optimisations turned off. BTW If T were polymorphic then that would not affect..

Polymorphism in c++

http://stackoverflow.com/questions/5854581/polymorphism-in-c

to fat interfaces failing at runtime SFINAE CRTP optimisations many including inlining and dead code elimination loop unrolling..

Inquiry about class variable declarations in C++

http://stackoverflow.com/questions/6272768/inquiry-about-class-variable-declarations-in-c

pointing to. The compiler is free to assume this and make optimisations that would lead to undefined behaviour if you violate it. However..

C-callback to function template: explicitly instantiate template

http://stackoverflow.com/questions/6734492/c-callback-to-function-template-explicitly-instantiate-template

void my_callback T value This seems to work even with optimisations enabled so that the dead branch is removed by the compiler ...

Move semantics - what it's all about? [duplicate]

http://stackoverflow.com/questions/6815685/move-semantics-what-its-all-about

Uses One benefit of move semantics is that it allows optimisations in certain situations. Consider the following regular value.. why the weaker post condition of move semantics allows optimisations. With this new move operation defined we can define an optimised.. in those cases without changing your code. To define move optimisations you need to define a move constructor and move assignment operator..

C-Style upcast and downcast involving private inheritance

http://stackoverflow.com/questions/844816/c-style-upcast-and-downcast-involving-private-inheritance

liable to break at any time e.g. when turning on compiler optimisations . As an example of a case that will definitely break on all..

What could cause a deterministic process to generate floating point errors

http://stackoverflow.com/questions/968435/what-could-cause-a-deterministic-process-to-generate-floating-point-errors

wikipedia My suspicion is that it has something to do with optimisations that have been applied to the code. I'm using the intel C compiler.. a floating point process non deterministic Are there other optimisations etc that could lead to this behaviour EDIT As per Pax's suggestion..