2 ms·
>If you're on a multi-core or multi-threaded systems then memory/cache behavior is more important...and out of your control. What do you mean "out of your cont
by dmitrygr 4y ago
>If you're on a multi-core or multi-threaded systems then memory/cache behavior is more important...and out of your control.
What do you mean "out of your control"?! How you lay out your data structures, what kind of locks you use is well within your control.
> Nobody cares about CSE, constant hoisting, anymore, because speculative execution will obviate that.
What fantasy land do you live in? Where do you get these magical unlimited-number-of-things-tracked OoO CPUs? Cause here in our world, speculative execution has limits and can only track so many in-flight instructions. Without optimization that will be less effective as you'll have more bloated unoptimized code (and more values) to track. Adding ability to track more things costs silicon and power! Without optimization you'll need to spill more values to stack as you'll be using registers less efficiently. More values on stack places more pressure on L1d, which pushes out other lines causing further perf loss.
So, no, your statement is approx 0% correct. Compiler optimizations matter a lot!