Second he profiles it to find the hot spots where it spends its time. Third he has the compiler produce assembly for those small sections of code. Fourth he hand tunes them looking for tiny improvements over the machine generated code. Some languages have compilers that produce C code, which can be further optimized by a C compiler. LISP, Scheme, Perl, and many other are suches.
Speed is fairly good.
Slow parts of a program might be intrinsically so. Perhaps a completely different approach to the problem might help, then. There are many reasons to inspect compiler-generated assembly code. The standard way to have assembly code be generated is to invoke your compiler with the -S flag.