Em seg., 28 de out. de 2024 às 12:08, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Ranier Vilela <ranier.vf@gmail.com> writes: > It seems to me that [reversing the loop direction] is more optimized.
That's far from clear: you're ignoring the possibility that memory access logic is better optimized for forward scanning than reverse scanning. I'd stick with the forward scan without some extremely detailed testing.
I don't disagree.
After posting, I was wondering if the first possible is not zero, it should probably be at the beginning and not at the end.