3 ms·
I find it strange you find it so unlikely that people have that much insight into their own code. The code I work on has several instances of likely/unlikely in
by scott_s 13y ago
I find it strange you find it so unlikely that people have that much insight into their own code. The code I work on has several instances of likely/unlikely in the main path for cases that we know happen either once, rarely, or when we are moving off the optimized path.
- ris 13y agoHave you tried benchmarking it against a non-annotated compiled version?
- scott_s 13y agoI have not, but I believe those who originally wrote it did.
- foxhill 13y agoi've never came across code that has performed better with manual hints than compiler profiling. at best, you can match the compiler, but.. i find that improbable, unless you have only a handful of branches.
- scott_s 13y agoThese are situations where the branch will be taken, literally, millions of times in one direction, and once in the other.