There's no obvious way to make it more efficient without significantlyexploding the amount of code, and we're talking about a scale where a bit
of n^2 is completely negligible. I've committed a patch that does exactly what you suggested, even if the code is organized a bit differently.
Please tell me if it works for you. -- Laurent