uniq without the need of sort (original) (raw)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Peng Yu
Subject: uniq without the need of sort
Date: Tue, 8 Nov 2011 10:30:31 -0600

Hi,

'uniq' currently relies on 'sort'. When the input file is small, this is OK. But when the input file is large, this seems to be a waste (the complexity is O(n log(n)), if uniq handles a hash table its self the complexity is only O(n)). I'm wondering if it is better to relax the requirement of 'sort' when 'uniq' is used.

-- Regards, Peng