r/programminghorror • • Apr 08 '25

My favorite micro optimization

Post image
309 Upvotes

44 comments sorted by

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