V2EX  ›  英汉词典

Common Subexpression Elimination

释义 Definition

公共子表达式消除:编译器中的一种优化技术,用来发现程序中重复出现且结果相同的表达式,把它们的计算结果复用(通常通过引入临时变量或重用已有值),从而减少重复计算、提升运行效率。(在某些情况下也可能增加寄存器/内存压力,因此会与其他优化协同权衡。)

例句 Examples

Common subexpression elimination avoids computing the same expression twice.
公共子表达式消除会避免对同一个表达式进行两次计算。

With common subexpression elimination enabled, the compiler can reuse the value of a*b across different branches when it is proven unchanged.
启用公共子表达式消除后,只要能证明 a*b 没有改变,编译器就可以在不同分支中复用它的值。

发音 Pronunciation (IPA)

/ˈkɑːmən ˌsʌbɪkˈsprɛʃən ɪˌlɪmɪˈneɪʃən/

词源 Etymology

该术语由三部分构成:common(公共的) + subexpression(子表达式) + elimination(消除)。在编译原理语境中,“公共”指在同一程序区域内多次出现、且在相关路径上其操作数不变从而结果可证明相同的表达式;“消除”指通过复用已计算值来去掉重复计算。该概念在早期优化编译器与数据流分析研究中逐步系统化,并成为经典优化之一。

相关词 Related Words

文学/著作示例 Literary Works

  • Compilers: Principles, Techniques, and Tools(Aho, Lam, Sethi, Ullman,“龙书”):在优化章节讨论冗余消除与表达式复用相关内容。
  • Advanced Compiler Design and Implementation(Steven Muchnick):系统讲解包括公共子表达式消除在内的多种优化与实现细节。
  • Engineering a Compiler(Cooper & Torczon):以工程视角介绍表达式冗余消除、值编号等相关方法。
  • Modern Compiler Implementation(Andrew Appel):在中间表示与优化部分涉及与该优化紧密相关的分析思想。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1311 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 16:40 · PVG 00:40 · LAX 08:40 · JFK 11:40
♥ Do have faith in what you're doing.