Tag
The article investigates why the Gauss-Seidel method, which converges faster theoretically, performs slower than Jacobi due to loop-carried dependencies, and shows how loop unrolling can improve performance.
A blog post demonstrates how adding a conditional check that appears useless can dramatically improve loop performance by allowing the CPU's branch predictor to eliminate data dependencies, achieving up to 4x speedup in a specific compression algorithm.
Matt Godbolt explores compiler optimizations that convert an O(n) summation loop into an O(1) closed-form solution, highlighting how Clang and GCC employ sophisticated techniques like loop unrolling and mathematical simplification to dramatically improve code performance.