Hi Milan,

thanks, I see what you mentioned with the “&&” operator. In fact, one case the behavior as I wanted is in crypto primitive (we need constant-time function to avoid time side-channel attack, for example, give any input for comparing with the secret hash value with fixed size, the time execution of comparing is constant.

Best,
Chan

On Feb 22, 2016, at 3:12 PM, Milan Stanojević <milanst@gmail.com> wrote:

Compiler short circuits && operator so your loop runs only til the first element that differs. If you swap the arguments to && you should get the behavior of visiting all elements (which is of course undesirable in practice)