A fast implementation of the network generation model