From listening to interviews of Apple tech folks, they also have done a lot of optimization of their CPUs based on calls frequently used by Mac OS. I don’t recall specific examples but the fact that they can control both the hardware and software allows them to profile and tune the system as a whole.