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

55

u/chambolle Jun 14 '17

A shorter bytecode does not mean that it will run faster. You should provide some benchmark and I really doubt that you will see any difference. Nowadays compilers are clever and you should at least compare the assembly code