Optimize Poisson PMF calculation