Why is assembly language still needed if we have high-level languages ​​that offer sophisticated tools?

At the university, I took a compulsory course in computer architecture and programming in a programming language. I found assembly language a lot of time and hard to understand. I still cannot understand why assembler is being trained. I asked one question from my instructor, and he smiled and said that you will find out in the future. But I have nature, and I can’t wait so long for an answer as soon as the question teases my mind. Therefore, I want to ask why we still need assembly language, if there are very powerful, fast and efficient programming languages, and in addition, such languages ​​offer a wide range of tools to facilitate programming. So why?

+5
source share
2 answers

One good reason - all programming languages ​​is an abstraction of how a computer works. Theoretically, for high-level languages, abstraction means that a programmer never has to worry about the details of a computer.

But abstraction is always leaky , for example. most (if not all) high-level languages ​​are not automatically optimized for CPU caches (for example, cache coherence and false access), and efficient multithreading is always complex. This means that if performance is critical, a programmer may have to write his code in different ways.

- , , , . , , 64 ( ) - & hArr; .


( C ) - , , , , .

( / .)

+12

- ,

  • ,
  • ,
  • , .

, C, C.

, - , , , , , ..

+5

All Articles