I expect good compilers can produce better than a good assembly-language programmer
only if we're talking about one of the very complex processors whose assembly languages are not user-friendly. The 6502 is not one of those though, which is one of the reasons we are attracted to it. Like Icy
said, "65x02 is wonderful. [...] It is natural, logical, it doesn't give you headache." (Take the "&start=6" off the URL to see the beginning of the forum topic.)
There are times in embedded control however when you simply
must know and control the amount of time a piece of code takes. No choice. If you know your compiler well enough to know that, you might as well write in assembly, unless the compiler can tell you for sure how many clock cycles it will take, or you want to look at the compiler's output.
We use relays in our equipment for lower distortion in situations where it has to pass a signal in the normally closed state if it loses power. I've had other situations in test equipment where solid-state relays couldn't cut it, for various reasons of distortion, controlling voltages far outside the power supply rails, etc..