small optimization in sampling
use buffer. less garbage
better DocIter api