I don't know if this is the right board to ask this on, but anyway...
I've often read that high level languages such as C and C++ are slower than coding in assembly. My question, then, is why? Doesn't the compiler convert the C/C++ code into machine code anyway, just as what happens with assembly code? If so, both are being converted to machine code, so what's the diff? Or is the conversion just not as efficient with high level languages?
I think I've read that C is only about 1-2% slower than assembly, but I'm quite sure what's the story with C++. I did once read a paper saying that it wasn't as fast as C, but I can't remember any exact numbers. Anyone had any first-hand experience in comparing their speed?