MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Increasing RandomInteger speed


Is there an intelligent way to speed up generating the following
sample from an inhomogeneous Poisson process to be comparable to the
homogeneous one?

mu = RandomReal[10, 10000];

{t1, sp1} = Timing[RandomInteger[PoissonDistribution[#], 1] & /@ mu];
{t2, sp2} = Timing[RandomInteger[PoissonDistribution[10], 10000]];

In[128]:= t1

Out[128]= 8.47253

In[129]:= t2

Out[129]= 0.004

Thanks,
Art


  • Prev by Date: V.6.0.2 gripes...
  • Next by Date: Re: Should I uninstall the old version before upgrading?
  • Previous by thread: Re: V.6.0.2 gripes...
  • Next by thread: Re: Increasing RandomInteger speed