Home >Common Problem >How do programs written in assembly language generally compare to high-level languages?
Compared with high-level languages, programs written in assembly language usually "execute more efficiently". Programs written in assembly language can be directly translated into machine code, which can be directly recognized by the computer; while programs written in high-level programming languages need some time to be translated into binary numbers that can be recognized by the machine before they can be executed by the computer, which reduces the cost of the computer. execution efficiency.
#Compared with high-level languages, programs written in assembly language usually "execute more efficiently".
Programming written in assembly language is directly translated into machine code.
High-level languages, such as C, C, Java, etc., must be translated into machine code corresponding to assembly before they can be executed.
For example, a simple "hello world', written in assembly language Program files may only be a few hundred bytes, while programs written in C, DELPHI, etc. are at least tens of thousands of bytes
Although it seems that the assembled program code is more cumbersome and not very readable, it is It is machine code that the computer can directly recognize; but high-level language is different. Although it is highly readable, the computer cannot directly recognize it.
For more programming-related knowledge, please visit:Introduction to Programming!!
The above is the detailed content of How do programs written in assembly language generally compare to high-level languages?. For more information, please follow other related articles on the PHP Chinese website!