Compilers are like people, the each have their own personality, strong points and weaknesses. If you were to compile those same routines on another compiler, chances are you would come up with totally different results. Knowing the quirks and strengths of your compiler is one of the necessities of being a successful embedded programmer.
All compilers optimize to varying degrees, coding in C is never an exact translation, while code in assembly is translated exactly from mnemonic and operands to machine code. Assembly language is still in use today for primarily that reason, there are no surprises, it's very compact and efficient code.