On Wed, Jun 05, 2013 at 11:27:43AM +0200, Andy Polyakov wrote: > > And do switch on optimization. > > Ironically other references found elsewhere suffer from very same > problem. E.g. HAVEGE discussed possibilities of "collecting uncertainty > from branch predictor" with "if (A==0) A++; else A--;" but fails to > recognize that compiler is free to use conditional move instruction, > i.e. generate branch-free code.
A CPU with branch prediction should also be very good at predicting that pattern, assuming that's code that executed in a loop and doesn't get swapped out. Kurt ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
