Originally posted by Hauldren Collider
View Post

I heard about this loop unrolling thing but it sounded like some toilet paper related activity and ever since my car was covered in toilet paper I have a crippling fear of it.
Compilers, though, are the main reasons. They'll not only automatically "unroll" loops, but they can tell when it's better to unroll the loop or keep it as is (computing the potential tradeoffs), etc. Also, consider using the "inline" keyword to hint to the compiler to inline the function. Keeps your code clean without the function jumping overhead.
Comment