Sorry, I was mistaken. I posted that on a mobile phone so I didn't have a chance to verify. Apparently I mixed up for i in [0..foo] with for i in [0..5], the latter of which does not expand to an inefficient version. And so when I saw that I thought they fixed the inefficient version in a recent CoffeeScript version or something.
Sorry for the mixup! Good to make more people aware of the "by 1" optimization.
View all comments
Show parent comment
2
u/R1cket May 19 '12
Sorry, I was mistaken. I posted that on a mobile phone so I didn't have a chance to verify. Apparently I mixed up
for i in [0..foo]withfor i in [0..5], the latter of which does not expand to an inefficient version. And so when I saw that I thought they fixed the inefficient version in a recent CoffeeScript version or something.Sorry for the mixup! Good to make more people aware of the "by 1" optimization.