In the previous post we talked about loop unswitching: a technique that the compilers use to make loops faster. Loop unswitching consists of detecting conditional statements whose condition never changes during the execution of the loop (loop invariant conditions) and then moving the condition outside of the loop. Loop unswitching opens the door for other […]
compiler vectorization
Many ways to speed up your program
There are many approaches to make your program run faster. Some approaches are based on using more efficient libraries, others rely on using the standard library and the language in an efficient manner. Other approaches include using more efficient algorithms. But sometimes, even after we’ve applied all the possible optimizations, the code performance is not […]
Trade a bit of precision for performance on hotspots with compiler vectorization directives
Most of the applications are fine when compiled with the -ffast-math compiler flag, which makes floating-point computations faster at the expense of some precision loss. However, in the scientific domain, floating-point precision is important so most of the time those codebases are compiled without this option. Still, the question of performance of such code remains […]