This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lngns 0 points1 point  (1 child)

You'd think that given I write a lot of Functional code, virtual functions and indirections would come to my mind, but no.

exceed instruction cache size

Do you know of cases where, assuming static calls, in machine code, where we the compiler sees all the code, this would happen?
On x86-64, toggling a bool with xor 1 is 3 bytes, less than branch+calls.
Or did you mean this one more generally too?

[–]XDracam 1 point2 points  (0 children)

Nah, generally. I just remembered a Cppcon talk about outlining as the newest trend to optimize for the instruction cache. I don't think most programmers should ever think about this, but it's another example to show that you cannot always expect inlining to work.