Class ConstructionPerformance


  • public class ConstructionPerformance
    extends Object
    Executes a benchmark to compare the speed of construction of random number providers.

    Note that random number providers are created and then used. Thus the construction time must be analysed together with the run time performance benchmark (see for example NextIntGenerationPerformance and NextLongGenerationPerformance).

     [Total time] = [Construction time] + [Run time]
     

    Selection of a suitable random number provider based on construction speed should consider when the construction time is a large fraction of the run time. In the majority of cases the run time will be the largest component of the total time and the provider should be selected based on its other properties such as the period, statistical randomness and speed.