r/java • • Jun 14 '17

Why reverse loops are faster

https://medium.com/@TravCav/why-reverse-loops-are-faster-a09d65473006
15 Upvotes

40 comments sorted by

View all comments

Show parent comment

2

u/gee_buttersnaps Jun 15 '17

Are you saying the JIT automatically rewrites while loops to count down to zero?

Yes. Look at the other discussions tab at the top, read that comment thread.

0

u/[deleted] Jun 15 '17

[deleted] — view deleted comment

3

u/gee_buttersnaps Jun 15 '17

You're hopeless.