The lack of dedicated LERP instructions on x86 is really not a significant competitive concern. Here's why:
Current x86 LERP implementation is already quite efficient:
- As person B noted, with FMA (Fused Multiply-Add) instructions available since Haswell (2013), you can implement LERP in just 2-3 instructions
- The FMA approach:
result = a + t * (b - a) can be done with one subtraction and one FMA
- With AVX-512, you can indeed process 16 float32 values or 8 float64 values simultaneously
ARM doesn't have dedicated LERP instructions either:
- ARM NEON and SVE/SVE2 also lack dedicated LERP instructions
- ARM developers use the same FMA-based approach as x86
- So this isn't really a differentiator between the architectures
Why dedicated LERP instructions aren't critical:
- Instruction decode pressure: Modern CPUs can decode multiple instructions per cycle, so 2-3 instruction sequences aren't a bottleneck
- Execution throughput: FMA units are heavily optimized and have high throughput (often 2 per cycle)
- Limited benefit: A dedicated LERP would save maybe 1 cycle of latency at best
- Instruction encoding space: x86 instruction encoding is already complex, and adding specialized instructions for every common operation isn't practical
The real competitive factors between x86 and ARM are things like power efficiency, instruction decode complexity, memory ordering models, and ecosystem - not the presence or absence of specific math instructions like LERP. Modern compilers and intrinsics make the FMA-based implementation trivial to use efficiently.