TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Reduction of Additions

64 点作者 dleskov超过 6 年前

1 comment

richard_shelton超过 6 年前
Thank you, really interesting reading!<p>It would be interesting to see how this rule (&quot;x = (y + c1) + c2 =&gt; x = y + (с1 + с2)&quot;) was encoded in the compiler. I guess it has more complicated form than a (simple and declarative) term rewriting rule, which you may use on AST transform stage.<p>There is a quote from Muchnik&#x27;s textbook: &quot;Like constant folding, algebraic simplifications and reassociation are best structured in a compiler as a subroutine that can be called from any other phase that can make use of it&quot;.<p>But it seems that in some cases, on the later phases with lower IRs, you just can&#x27;t use this &quot;subroutine&quot; as is.
评论 #18601885 未加载