Slightly faster algorithm for rand_IT( )

For the test community, the new version takes 390s vs 460s for the old
version.