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

后端 未结 16 1776
野的像风
野的像风 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:14

    According to Knuth, studying the efficiency of algorithms. He mentions in his books there is no better way to study how an algorithm works than writing in in assembly.

    0 讨论(0)
  • 2021-02-14 16:15

    Boost, being as modern C++ as it is, uses inline assembly for low-level performance-critical bits like atomic shared counters.

    Edit: as @TokenMacGuy correctly notes, "performance" is a wrong word here. Boost uses assembly language for things that cannot be accomplished in standard C++ such as atomics (and compiler intrinsics are not available for some reason.)

    0 讨论(0)
  • 2021-02-14 16:21

    I believe that the Folding@Home parallel computing project uses optimized assembly code for maximum speed.*

     * Note: this does not mean assembly is always faster then C/C++.

    0 讨论(0)
  • 2021-02-14 16:21

    The last time I came across assembler was when I used to hack the Quake I source code. All the math libraries (especially anything for dot products) were written in MASM by John Carmack. This stuff was floating-point intensive, and at the time C wasn't as good as expertly hand-crafted ASM for floating operations. Also, since computers were far more CPU-limited, and since Quake used the CPU for rendering, every single operation mattered, so ASM worked best.

    0 讨论(0)
  • 2021-02-14 16:21

    I think the most prominent programs where assembler is used are boot-loader.

    0 讨论(0)
  • 2021-02-14 16:23

    Speaking from experience, it's heavily used when testing and verifying new processor designs. The instruction set has to be stressed using code that a compiler won't necessarily generate. Rather than writing in some higher level language that may or may not compile to the instructions one wants to check, it's easier to write the assembly by hand.

    0 讨论(0)
提交回复
热议问题