2 ms·
In my school, we were taught about them, sure, but not in great detail. We certainly weren't taught how to detect code that has bad branch prediction behavior
by Sohcahtoa82 9y ago
In my school, we were taught about them, sure, but not in great detail. We certainly weren't taught how to detect code that has bad branch prediction behavior or how to write code that prevents branch mispredictions. I don't think we even covered cache locality.
I disagree on the original SO question as being a good weed-out question for an entry level position. This is a code optimization that I certainly wouldn't expect a newbie to know.