steerb
In my last question I was just wondering how or when you (or others) tend to improve their coding style. For me its mostly when reading other peoples code and noting that a) certain aspects are great or b) not so great. But maybe that just comes naturally to me because I don't have that much experience under my belt.
When you mostly work with your own code, do you still have that feeling of constantly improving your coding style and code quality (like looking at code that is X months old and knowing you would write it differently today)?
The basic idea is to allow your compiler to use predicated instructions. Do do this, you have to transform control dependencies (e.g., `if (a > b)`) to data dependencies on index computations (e.g., `j = 2*j + (a > b)`).
For a complete explanation, see http://algo2.iti.kit.edu/sanders/papers/ssss.ps.gz
Let's assume a sufficiently smart compiler can parallelize 90% of our hot code. Now considering Amdahl's Law, we cannot achieve a speedup greater than 10 and are therefore stuck. Adding 10 or more cores won't do any good to our running time, because it is dominated by the sequential code.
The current default behavior, which you call crazy, does however favor programs which do actually need the data that was just read (e.g., databases).