Would this benefit from the galloping optimization Tim Peter's was talking about on Hn recently?
If one side is bigger than the other, try to find how many elements you can add from that side and advance that far.
If one side is bigger than the other, try to find how many elements you can add from that side and advance that far.
I'm wondering if this removing the branch idea and the galloping idea can coexist.