Improved performance of calculating multiple factorials in paralle