Vector Class Discussion

Optimization of Code Path at Run Time
Author: Agner Date: 2018-02-18 11:17
Royi wrote:
does it create optimized code path according to CPU features on run time?
This is indeed possible. You need to compile the same code multiple times with different instruction sets enabled on the compiler command line, and then link the multiple object files together so that you can select the optimal one at runtime. See the chapter "Instruction sets and CPU dispatching" in the manual. The file dispatch_example.cpp shows an example of how to do this.
 
thread Optimization of Code Path at Run Time new - Royi - 2018-02-18
last replythread Optimization of Code Path at Run Time - Agner - 2018-02-18
last replythread Optimization of Code Path at Run Time new - Royi - 2018-02-18
last reply Optimization of Code Path at Run Time new - Agner - 2018-02-19