>>1,4,5I cannot think of any situation where it would strongly benefit you to do this sort of ordering by hand. If it really matters, most compilers will allow you to declare an output section for each function so you can set the ordering at link time. You'd probably be better of just using assembly for the entire hot path though.
IHBT>>2Profile guided optimizers do exactly this.
>>14You can't rely on this behavior if your toolchain re-orders functions based on input from a profile guided optimizer, or if it generates a separate segment for each function (for link time dead code elimination, etc). If your compiler doesn't support either of these, it's crap.