About Automatic Processor Dispatch

Pro
Code performs better than standard optimized code, although slightly slower than code compiled with the -Qx[|K|W|N|B|P] options, as the latter doesn't determine on which processor the application is running.

Con
Performance is affected by the run-time checks to determine which code to run.

Automatic Processor Dispatch options direct the compiler to find opportunities to generate separate versions of functions that use instructions supported on the specified processors (see the table in the next topic).

If the compiler finds such an opportunity, it first checks whether generating a processor-specific version of a function is likely to result in a performance gain. If so, the compiler generates both a processor-specific version of a function and a generic version of the function. The generic version runs on any IA-32 processor.

Note: You can specify a maximum of two processor-specific code paths with this option. In addition to the generic code path that runs on any x86 processor.

For the target processor, the compiler uses:

  • processor-specific opcodes
  • prefetch operations
  • vectorization