Getting the Most Out of Your Code With Help From the Compiler

No ratings

Presented at cloudopen 2014 by

Traditionally, supporting new processor instructions required writing assembly code. Those days, processors are very complex and maintaining assembly code by hand is a hard and tedious task, not to mention that processors evolve and getting the timings right of each generation is better left to the compiler. A little known feature of the compilers is that it is possible to get access to certain instructions from high-level C and C++ code. Yet modern compilers can offer more functionality to help the bold developer write better code. This presentation will present those techniques and show which ones work on GCC, Clang and the Intel compiler. It will also show how to get more information on which intrinsics exist and what they do. It will draw heavily upon the presenter's experience implementing this very type of optimisations for Qt 5.3.