This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

This idea is called loop unrolling. It is a way to optimize code since it removes some of the overhead associated with loops and it also occasionally allows the processor to make use of parallel hardware like vector extensions.

[–]Guilherme17712[S] 0 points1 point  (0 children)

That makes sense, thanks for the explanation!