Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们可以在 c++ 中看到优化的代码............(不是汇编)吗?
不。
“优化”是编译器对中间表示和程序集所做的事情,而不是对源代码。
优化后的代码很少会干净地翻译回它所来自的语言,而优化是完整的,因为优化通常会发生在汇编级别。要么,要么“优化”在 C++(或其他语言)级别完全是人为的 - 例如,使用一条指令而不是另一条指令实现 if 语句之间的区别。