Use a local variable for storing temporal random value, so there isn't contention between threads for writes (~10x speedup).