Efficient Simulation of Biological Processes in the Stochastic pi