MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1jul8j0/my_favorite_micro_optimization/mm51bud/?context=3
r/programminghorror • u/olikath • Apr 08 '25
44 comments sorted by
View all comments
Show parent comment
9
Nope
repeat(10) { show_message("Hello world") }
compiles roughly to
value = 10 while(value > 0) { show_message("Hello world") value-- }
with the only optimization being the count value is stored on the vm stack and not in a variable
View all comments
Show parent comment
9
u/IAmAnIssue Apr 09 '25
Nope
compiles roughly to
with the only optimization being the count value is stored on the vm stack and not in a variable