User blog comment:LittlePeng9/Random Turing machines/@comment-10429372-20150506145612/@comment-2033667-20150508062953

Try writing a dedicated program to simulate it in C or C++ and see if there's any speedup.