much faster random sampling