It's much better to use any of the numerous SIMD wrappers such as libsimdpp or Vc and get various benefits for free. It's possible to target everything from SSE and NEON to AVX512 with what is essentially a single code path.
I'm trying to understand speculative execution.<p>Given this<p><pre><code> int result = foo != bar ? do_side_effect_and_return() : safe_return();
</code></pre>
C code, am I right to assume both functions will be executed speculatively?<p>What other potential bugs/gotchas are lurking with speculative execution?