MarkovChain rand speedup