in reply to best sort

How many records are you dealing with? What percentage of total processing time does the sort consume?

Encapsulate into a simple object or module so you can compare multiple solutions. By the time you finish the rest, you won't care about this bit any more, I bet.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Replies are listed 'Best First'.
Re^2: best sort
by ag4ve (Monk) on Aug 19, 2011 at 00:44 UTC
    well, i was asked theoretically how to do this as records are parsed. however, i generally deal with 5-10k lines of csv files and it would sometimes be good to count dupes of certain fields and not have to worry about sorting the count of 30+ columns when looking for these duplicates at the end of processing them would be cool. it only takes a few seconds. but, the theoretical question and noticing the processing time at the end was enough to make me want to look into another way to deal with this.