What kind of projects (besides the obvious OS stuff) use assembly language?

后端 未结 16 1896
野的像风
野的像风 2021-02-14 15:48

Seemingly, no one uses assembly nowadays other than to develop device drivers, or the very core of OS kernels etc. Anyone has knowledge of it being currently used for other thin

16条回答
  •  离开以前
    2021-02-14 16:25

    In C, at the fundamental level, it's pretty easy to see how a set of instructions becomes assembler (if you understand the underlying architecture). But sometimes, assembler can't be beat. Note that it is possible to write crappy, inefficient assembly code as easily as it is to write crappy C code. And assembler is way less maintainable. And it isn't portable anywhere.

    And it all depends on the quality of the C compiler you're using. Some do better than others. Most compilers allow you to see the assembler code they generate. If you think you can do better, and the code segment is critical, do it. Otherwise, avoid it. Carefully crafted C can be very close to the metal, given a decent compiler.

提交回复
热议问题