Home  >  Article  >  How do programs written in assembly language generally compare to high-level languages?

How do programs written in assembly language generally compare to high-level languages?

青灯夜游
青灯夜游Original
2020-11-02 11:04:3639648browse

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.

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".

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn