3 ms·
> However, that wouldn't mean every core must implement every possible instruction - instead, unimplemented features would be emulated. For (fixed-length-)vect
by mananaysiempre 2y ago
> However, that wouldn't mean every core must implement every possible instruction - instead, unimplemented features would be emulated.
For (fixed-length-)vector extensions in particular, I’m not sure that would work well. For nontrivially vectorizable things (i.e. you’re not just doing a bunch of math in parallel), the usual tradeoff is that you use a couple times more compute, but because the vector unit can provide a couple dozen or more times the compute per clock the result is faster despite the apparent waste. Emulating such code, on the other hand, will likely be miserable.
- londons_explore 2y agoBut 99% of code does not use vector instructions. That last 1% will either get slower (emulating trapped instructions), or have a 2nd non-vectorized implementation, with the binary containing both.
- snvzz 2y ago>But 99% of code does not use vector instructions. Note that both LLVM and GCC will try to auto-vectorize code and emit vector instructions.