How do I find how C++ compiler implements something except inspecting emitted machine code?

后端 未结 8 1791
渐次进展
渐次进展 2020-12-17 14:28

Suppose I crafted a set of classes to abstract something and now I worry whether my C++ compiler will be able to peel off those wrappings and emit really clean, concise and

8条回答
  •  萌比男神i
    2020-12-17 15:09

    If your compiler manages to translate your "wrappings and emit really clean, concise and fast code" the effort to follow-up the emitted code should be reasonable.

    Contrary to another answer I feel that emitted assembly code may well be "clean" if it is (relatively) easily mappable to the original source code, if it doesn't consist of calls all over the place and that the system of jumps is not too complex. With code scheduling and re-ordering an optimized machine code which is also readable is, alas, a thing of the past.

提交回复
热议问题