rand() performance restored with faster code path and inlining.