benchRun() doesn't generate random distribution within the specified range

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.3.1
    • Affects Version/s: None
    • Component/s: Performance
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      rand() returns an integer between 0 and RAND_MAX, which is 32767 on posix systems. Thus using #RAND_INT in benchRun() will not create an even distribute for a large range. See bench.cpp L300:

      int x = min + ( rand() % ( max - min ) );

              Assignee:
              Eric Milkie
              Reporter:
              Ben Becker (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: