Optimize `_.sample`.