Actually, we did reduce the complexity to a constant: Went from n^2 to just n:
<a href="http://ejohn.org/blog/function-call-profiling/" rel="nofollow">http://ejohn.org/blog/function-call-profiling/</a><p>The 4x number was wall-clock time for the particular tests - so obviously your mileage may vary. In fact, the more complicated your case the better your eventual gains will be.