Add sorted take optimizations

closes #880

Should be good enough, I think.
Make this 100 a constant value and declared right after the comments?