skip to content
Ivan's wiki
Site Tools
Search
Tools
Show pagesource
Backlinks
Recent Changes
Media Manager
Sitemap
>
Recent Changes
Media Manager
Sitemap
gcc
This page is read only. You can view the source, but not change it.
# GCC **GCC** (GNU Compiler Collection) is the standard C, C++, and Fortran compiler on Linux. More than a translator to machine codeāit optimizes aggressively, reordering instructions, eliminating dead code, vectorizing loops, and inlining functions. Performance can change by an order of magnitude based on optimization choices. In HPC, understanding what GCC does with your source is as important as understanding what your code does. `-O3` is a starting point. Read the generated assembly when a loop is slower than expected; it reveals what the compiler actually emitted and where the bottleneck is. ```bash $ gcc -O3 -march=native -S -fverbose-asm hot_loop.c -o hot_loop.s $ cat hot_loop.s # read assembly with source annotations ``` Compile with appropriate flags for your target, enable warnings to catch bugs early, and learn to read assembly to debug performance. ## Concepts 1. [Basics](/gcc-basics) 2. [Optimization levels](/gcc-optimization) 3. [Vectorization](/gcc-vectorization) 4. [Warnings](/gcc-warnings) 5. [Assembly](/gcc-assembly) 6. [Debugging](/gcc-debugging) 7. [Inlining](/gcc-inline) 8. [Link-time optimization](/gcc-lto) 9. [Profiling](/gcc-profiling) 10. [Cross-compilation](/gcc-cross-compilation) 11. [Flags reference](/gcc-flags) 12. [Performance tuning](/gcc-performance)
Page Tools
Show pagesource
Backlinks
Back to top