开发者

optimization possibilities for known loop trip counts

开发者 https://www.devze.com 2023-02-27 09:43 出处:网络
What can a compiler do for o开发者_StackOverflowptimization if it knows the loop trip count of a loop? Loop unrolling is one.What are others?

What can a compiler do for o开发者_StackOverflowptimization if it knows the loop trip count of a loop? Loop unrolling is one.What are others?


  • Avoidance of loop-skip-check on loop entry (many modern languages allow loops to have zero iterations, but you have to check on entry)
  • Better SIMDization (blocking the loop iterations into chunks processable by small vectors)
  • Removal of subscript range checking (or diagnosis of error) (for those languages that insist)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号