Is C as fast or faster than hand-coded assembler code?

C code would be just as fast as assembly if you

Assembler code is usually much faster if you do like this:

Is C code more portable that assembler code?

C code is usually more portable than assembler if any of this holds:

Why use assembler in an OS project?

It will be both faster and smaller. This is significant for all parts of an OS. Some say you don't need to optimize the file-system since the disk-drives are slow anyway. Well, that's not true, since many of the requests for files will be read from buffers. Many portable, C based OSes have a very slow file-system, and it's not because the disk-drives are slow, it's because the C code and all the layering. File-system performance is actually one of the most critical parameters in an OS!