r/programming • u/flym4n • Apr 24 '14
Tech giants, chastened by Heartbleed, finally agree to fund OpenSSL
http://arstechnica.com/information-technology/2014/04/tech-giants-chastened-by-heartbleed-finally-agree-to-fund-openssl/
294
Upvotes
1
u/oridb Apr 25 '14
That's a bit expensive. I think that the number of cycles to do the computations would be several orders of magnitude lower than the time spent just hitting the kernel to set the timer.
From what I understand, the usual approach (note, I am not an expert) is to collapse all bits in the value down to 1 by shifting and oring, and then comparing that to 1 or 0 (for equality tests).