optimization possibilities for known loop trip counts
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)
精彩评论