Top "Compiler-optimization" questions

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

How to make GCC generate bswap instruction for big endian store without builtins?

I'm working on a function that stores a 64-bit value into memory in big endian format. I was hoping that …

c gcc x86 compiler-optimization endianness
Why is -march=native used so rarely?

With most C/C++ compilers, there's a flag passable to the compiler, -march=native, which tells the compiler to tune …

gcc clang compiler-optimization
Why is "while (i++ < n) {}" significantly slower than "while (++i < n) {}"

Apparently on my Windows 8 laptop with HotSpot JDK 1.7.0_45 (with all compiler/VM options set to default), the below loop final …

java performance compiler-optimization post-increment pre-increment
Why does the enhanced GCC 6 optimizer break practical C++ code?

GCC 6 has a new optimizer feature: It assumes that this is always not null and optimizes based on that. Value …

c++ gcc compiler-optimization undefined-behavior
Disable all optimization options in GCC

The default optimization level for compiling C programs using GCC is -O0. which turns off all optimizations according to GCC …

c gcc optimization performance-testing compiler-optimization
How to compile and run an optimized Rust program with overflow checking enabled

I'm writing a program that's quite compute heavy, and it's annoyingly slow to run in debug mode. My program is …

rust compiler-optimization integer-overflow
Any way to install Pandas with PyPy?

I'm trying to run some code using PyPy to speed it up. My code uses Pandas dataframes, so I'm trying …

python performance pandas compiler-optimization pypy
C loop optimization help for final assignment (with compiler optimization disabled)

So for my final assignment in my Computer Systems class, we need to optimize these for loops to be faster …

c loops optimization compiler-optimization debug-mode
How does GCC optimize out an unused variable incremented inside a loop?

I wrote this simple C program: int main() { int i; int count = 0; for(i = 0; i < 2000000000; i++){ count = count + 1; } } I …

c gcc compiler-optimization disassembly
Why does this code cause a Floating point exception - SIGFPE

Using gcc 4.7: $ gcc --version gcc (GCC) 4.7.0 20120505 (prerelease) Code listing (test.c): #include <stdint.h> struct test { int before; …

c exception compiler-optimization gcc4