Top "Compiler-optimization" questions

Compiler optimization involves adapting a compiler to reduce run-time or object size or both.

Which one is faster ? Function call or Conditional if Statement?

Please consider the branch prediction too before answering this question. I have some scenarios where i can replace a conditional …

c++ optimization architecture compiler-optimization data-oriented-design
How do C compilers implement functions that return large structures?

The return value of a function is usually stored on the stack or in a register. But for a large …

c compiler-optimization calling-convention abi compiler-theory
Can I hint the optimizer by giving the range of an integer?

I am using an int type to store a value. By the semantics of the program, the value always varies …

c++ optimization integer range compiler-optimization
Which gcc options reduce code size?

I'm constrained by a 128Kb limit executable size for an embedded PowerPC system. Unfortunately, using option -Os to optimize for …

c gcc compiler-optimization powerpc compiler-options