(original) (raw)
Hi Vladimir,
I think this could work:
An idea: What about considering all branches dependent on array loads as rather unpredictable and lower the�BlockLayoutByFrequency for them? It's just a guess but it would allow for both benchmarks to be fast and it will be right more often than not.
Finding out what the condition depends on should be easy. Data loaded from arrays are probably the least predictable and the loop index is probably the most harmless.
The branching cost is the product of�the�branching probability and the "unpredictability", so it makes sense to me.
Regards,
Martin.