News for hackers. Stuff that matters.
Re:Why is Rosetta 2 fast? by bluGill on Wednesday November 09, 2022 @07:39PM (#33540510)
CPUs have documentation, for this. I forget which one, but the one I did read it was as simple as the true case is assumed more common, and it is easy to arrange logic around that (I probably mis remember, but close enough to that). The common case also should be near the if in memory (inline code), so it is likely on the same cache line (or the next which is prefetched), while the other case is farther away and so you can stall the cache if the if goes that way.

There are no comments on this comment yet.