Performance horrors

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Wed Aug 27 17:32:17 EDT 2008


On 2008 Aug 27, at 17:09, Christopher Lane Hinson wrote:
>>> WDYT about using RULES to rewrite to nubOrd if an Ord context is
>>> available, as John Meacham mentioned?
>>>
>>> John: you said you were uneasy about changing the complexity of an
>>> algorithm using RULES, but this is exactly what list fusion does
>>> (albeit for space, not time).
>>
>> Indeed. and I am a little uneasy about that too :) not that I don't
>> think it is an excellent idea and reap the benefits of fast list
>> operations.. O(n^2) to O(n log n) just feels like a bigger jump to me
>>
> Using RULES in this way could be a pessimization.  I can't imagine a  
> nubOrd that would ever be as performant as nub on very small data  
> sets (two or three elements).


I think if you're in a situation where the performance of nub on such  
a small dataset matters, you're already well into the realm of  
controlling everything manually to get performance.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Libraries mailing list