Click to See Complete Forum and Search --> : Why Programs Coded in Assembly Language is Faster than Ones Coded in HLL?


f.ben.isaac
December 30th, 2008, 08:55 PM
I know Assembly is the nearest language to the hardware, but this does not answer my question:

Isn't all what processor cares is the object code & since all compiled code or assembled code produce an output of an object code! So the processor really do not care except for the binary file (object code). Than what makes assembly faster than c or c++ if it all bowls down to the same pool, producing object code?

Thanks

TheCPUWizard
December 30th, 2008, 09:34 PM
Older compilers were not very sophesticated, and generated relatively poor code. Much has changed in this regard, and in a significant number of cases, the compiler will generate more efficient code than the "average" assembly language programmer.

"C" was created specifically to be as close to the machine level instruction set (specifically for the Digital Equipment PDP-11 mini-computer of the 1970's & 1980's).