Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-197

RandomDataImpl.nextPoisson() is extreme slow for large lambdas

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0, 1.1, 1.2
    • 2.0
    • None
    • None
    • jdk1.6.0_04, windows xp

    Description

      The RandomDataImpl.nextPoisson() is extreme slow for large lambdas:

      E.g. drawing 100 random numbers with lambda = 1000 takes around 10s on my dual core with 2.2GHz.
      With lambda smaller than 500 everything is fine. Any ideas?

      RandomDataImpl r = new RandomDataImpl();
      r.reSeed(101);

      int d = 100;
      long poissonLambda = 1000;

      long st = System.currentTimeMillis();
      for (int row = 0; row < d; row++)

      { long nxtRnd = r.nextPoisson(poissonLambda); }

      System.out.println("delta " + (System.currentTimeMillis() - st));

      Attachments

        Activity

          People

            brentworden Brent Worden
            zubow Tolja Zubow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: