When is assembly faster than C?

前端 未结 30 2480
挽巷
挽巷 2020-12-02 03:18

One of the stated reasons for knowing assembler is that, on occasion, it can be employed to write code that will be more performant than writing that code in a higher-level

30条回答
  •  时光取名叫无心
    2020-12-02 04:07

    The simple answer... One who knows assembly well (aka has the reference beside him, and is taking advantage of every little processor cache and pipeline feature etc) is guaranteed to be capable of producing much faster code than any compiler.

    However the difference these days just doesn't matter in the typical application.

提交回复
热议问题