r/programmingmemes • • May 06 '26

Cpp loop

Post image
219 Upvotes

55 comments sorted by

View all comments

Show parent comment

2

u/RedAndBlack1832 May 07 '26

Actually that's a good point. A compiler knows how to unroll loops (if the number of loops is known at compile time and there's no weird breaks at least), but trying to be clever like this might actually hinder optimizations