Zefram <zefram@fysh.org> wrote: :Dave Mitchell wrote: :>1) Has anyone looked at this recently to know whether gcc does anything :>useful with it? : :Yes, it does. I'm using this facility in a module that I'm currently :writing, and I perused some of the generated assembly code to see :whether it makes a difference. gcc tends to arrange for the unlikely :case to be taking a branch, while the likely case is to continue inline. :This is the same thing that I do when writing assembly code manually. :(amd64, gcc 4.4.5.) Do you know how this facility plays out in the presence of hardware branch prediction? The impression I get is that successful hardware prediction of a (cacheline-busting) branch is most likely still slower than successful hardware prediction of a non-branch, so that software hints are still useful; but I really can't tell for sure from the online resources I've found. HugoThread Previous | Thread Next