3 ms·
Latency of instructions, number of ALUs and FPUs and available special functions differ from micro architecture to micro architecture. This makes the compiler b
by legulere 4y ago
Latency of instructions, number of ALUs and FPUs and available special functions differ from micro architecture to micro architecture. This makes the compiler behave differently in instruction selection when you select different micro architectures.
With llvm-mca you can check how each micro architecture will behave differently for the same machine code: https://llvm.org/docs/CommandGuide/llvm-mca.html https://llvm.org/docs/CommandGuide/llvm-mca.html
- throw10920 4y agoOf course, implementation details are different between microarchitectures - that's the definition, after all. However, "agnostic" usually means that behavior doesn't vary. Performance is orthogonal to behavior in this case. I definitely don't expect code optimized for Haswell to be as fast on a Broadwell as code optimized for Broadwell, but I do at least expect it to run.