Good sleuthing, sounds like an instance of &quot;accidentally quadratic&quot;[1].  It&#x27;s a very easy thing to miss, especially if <i>n</i> is usually small.<p>[1] <a href="http:&#x2F;&#x2F;accidentallyquadratic.tumblr.com" rel="nofollow">http:&#x2F;&#x2F;accidentallyquadratic.tumblr.com</a>