On Fri, May 27, 2011 at 3:13 PM, Julian Foad <julian.f...@wandisco.com> wrote: > On Fri, 2011-05-27 at 13:32 +0200, Johan Corveleyn wrote:
[snip] >> Maybe some of the performance improvement (and simplification) can be >> achieved simply by calculating idx0 and idx1 once, and then reusing >> those variables and pass them on: >> >> idx0 = length[0] > length[1] ? 1 : 0; >> idx1 = abs(1 - idx0); >> >> instead of re-calculating abs(1 - idx) everywhere. > > Why does it use "abs()", I wonder? That looks redundant if idx can only > be 0 or 1. Ah yes, of course. Doh! Why indeed. -- Johan