Top "Compiler-optimization" questions

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

Is it possible to implement bitwise operators using integer arithmetic?

I am facing a rather peculiar problem. I am working on a compiler for an architecture that doesn't support bitwise …

bitwise-operators discrete-mathematics compiler-optimization
Why can't (or doesn't) the compiler optimize a predictable addition loop into a multiplication?

This is a question that came to mind while reading the brilliant answer by Mysticial to the question: why is …

c performance compiler-optimization
Why can't C compilers rearrange struct members to eliminate alignment padding?

Possible Duplicate: Why doesn't GCC optimize structs? Why doesn't C++ make the structure tighter? Consider the following example on a 32 …

c struct compiler-optimization memory-alignment
Using Assembly Language in C/C++

I remember reading somewhere that to really optimize & speed up certain section of the code, programmers write that section …

c++ c optimization compiler-optimization assembly
What is the proper architecture-specific options (-m) for Sandy Bridge based Pentium?

I'm trying to figure out how to set -march option properly to see how much performance difference between the option …

gcc compiler-optimization compiler-flags
What is &&& operation in C

#include <stdio.h> volatile int i; int main() { int c; for (i = 0; i < 3; i++) { c = i &&…

c++ c operators compiler-optimization gcc-warning
Should I use const for local variables for better code optimization?

I often use const for local variables that are not being modified, like this: const float height = person.getHeight(); I …

c++ performance optimization constants compiler-optimization
Why not always use compiler optimization?

One of the questions that I asked some time ago had undefined behavior, so compiler optimization was actually causing the …

compiler-construction compiler-optimization
Disable compiler optimisation for a specific function or block of code (C#)

The compiler does a great job of optimising for RELEASE builds, but occasionally it can be useful to ensure that …

c# .net optimization compact-framework compiler-optimization
Can't turn off gcc optimizer, Makefile from automake

I am trying to get ZBar in a debug session. I am able to do so, but I can't get …

gcc compiler-optimization automake zbar-sdk