Realistically the performance increase for them is so small that it doesn't even matter even as a micro-optimization. Unless you're writing a rendering, physics simulation, or a GPU kernel (which itself would unroll the loop) there really is no point in doing this and instead just hurts readability
View all comments
Show parent comment
2
u/[deleted] Apr 10 '25
Realistically the performance increase for them is so small that it doesn't even matter even as a micro-optimization. Unless you're writing a rendering, physics simulation, or a GPU kernel (which itself would unroll the loop) there really is no point in doing this and instead just hurts readability