3 ms·
@InclinedPlane Hi! That's true, there are other development tasks where the vast majority of developers should look at with greater priority. Still, I'd like
by adg001 16y ago
@InclinedPlane
Hi!
That's true, there are other development tasks where the vast majority of developers should look at with greater priority.
Still, I'd like to suggest what is the main takeaway from the Igor's post, if you may.
I would like to put the emphasis on the role played on timings by the presence data-dependent branches, and not on how developers should try to optimize the performance by keeping the pipelines stages as busy as possible.
This have practical importance, for example, while implementing cryptographic algorithms or secret-dependent algorithms, as the timing patterns can be exploited by side channel attacks.
Nothing new, something already happened:
Predicting Secret Keys via Branch Prediction
by Onur Aciicmez and Jean-Pierre Seifert and Cetin Kaya Koc
http://eprint.iacr.org/2006/288.pdf http://eprint.iacr.org/2006/288.pdf
On the Power of Simple Branch Prediction Analysis
by Onur Aciicmez and Cetin Kaya Koc and Jean-Pierre Seifert
http://eprint.iacr.org/2006/351.pdf http://eprint.iacr.org/2006/351.pdf
Of course, Igor's post is not about cryptanalysis, agreed. Still provides some useful quantities relating mispredicted branch number to the spent cycles.
Cheers