Tags

#Compiler-Optimization

2 posts

Low-Latency Systems Development #13 14 min read

Type Punning, Function Calls, and Compiler Hints

How far the compiler can optimize depends on what it can see and what it dares to assume: different types are treated as non-overlapping, an invisible function body means arguments go by the calling convention, and helper macros …

Low-Latency Systems Development #9 21 min read

Loop Optimization

A dot-product loop reports “vectorized” at -O3, yet its four additions still wait on each other: floating-point addition isn’t associative, so the compiler won’t reorder it. What loop optimization really asks of you is to spot …