Joel: > Very nice summary! > > May I pick one small nit and reminisce for a moment?
Sure! <snip> > I should have been more clear about the goal of my submission. > I meant to imply (but I didn't state well) that we need to be > careful about the force of habit, as it is VERY powerful. We > all jumped to the conclusion, based on Louis's first question, > that we needed to sort the data. Absolutely well spotted. The insight being that Louis's data is already sorted. It's just been interleaved in sets. The interleaving is undoable -- as you show -- without using sort. What was then left to check was if the de-interleafing algorithm is faster than just letting 'sort strutt its stuff. On my machine, under 1.2.1.3.1, your method was neck and neck with Scott's. Under 1.2.5.3.1 you came in 50% faster than his. So it is definitely a worthwhile technique to remember. You got there by thinking about the nature of the data. It may be that Louis can take that one step Luther: How did the input to our phase (which was, we're both assuming, the output from some other phase) get to be in that interleaved state anyway? Maybe that earlier phase could be tweaked to emit the data how we want it. That'd take zero sort time in our phase. If that's possible, I'll claim to be the originator of the unbeatably-fastest solution to his original question. > I didn't remember it (consiously... ;-) until writing this > particular email, but there's a really lovely book titled > _Programming_Pearls_ by Jon Bentley of AT&T Bell Labs (the I know. It's a great read. I have it somewhere in a cardboard box awaiting reshelving one day. A recommended read for everyone. Sunanda. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
