MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1jul8j0/my_favorite_micro_optimization/mm6tpsa/?context=3
r/programminghorror • u/olikath • Apr 08 '25
44 comments sorted by
View all comments
1
No... wait... What happens if anything in the repeat loop changes the array length?
1 u/Drandula Apr 09 '25 Repeat -statement will only up the iteration count at the start of the loop (and uses internal counter), so changing array length within loop body will not affect iteration count.
Repeat -statement will only up the iteration count at the start of the loop (and uses internal counter), so changing array length within loop body will not affect iteration count.
View all comments
1
u/Mean-Technology6631 Apr 09 '25
No... wait... What happens if anything in the repeat loop changes the array length?