> Isn't Richard's code much faster for long lists and small Ns thank taking the length of the list?

Yes, I didn't read very carefully.

-- Graham Dobbins