[ https://issues.apache.org/jira/browse/RNG-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16694670#comment-16694670 ]
Alex D Herbert commented on RNG-57: ----------------------------------- {quote}we provide a robust script that will start "DieHarder" and "[Big]Crush" {quote} I already had to write a script to parse the output and generate a table for this ticket. Surely you also have scripts that you are using to create the user guide? I was going to submit the changes I made to {{examples-stress}} to build the shaded jar file as a PR. I could add my scripts. However they are far from robust. If this is a desired output, e.g. for RNG-29, then some more work should be done to make the executable jar files with a {{main}} a bit more user friendly, e.g. a decent help message. {quote}What can we conclude from that? {quote} Not much. The dieharder_dna test is marked as suspect anyway. Literally it would mean do not use that RNG to generate 4 letter DNA sequences using consecutive 2-bit letters from the {{int}}. This does have implications for the {{StringSampler}} discussed in RNG-54 since that is exactly what was discussed (for any power of 2 alphabet). > CachedUniformRandomProvider for nextBoolean() and nextInt() > ----------------------------------------------------------- > > Key: RNG-57 > URL: https://issues.apache.org/jira/browse/RNG-57 > Project: Commons RNG > Issue Type: Improvement > Components: core > Reporter: Alex D Herbert > Priority: Minor > Labels: performance > Fix For: 1.2 > > > Implement a wrapper around a {{UniformRandomProvider}} that can cache the > underlying source of random bytes for use in the methods {{nextBoolean()}} > and {{nextInt()}} (in the case of {{LongProvider}}). E.g. > {code:java} > LongProvider provider = RandomSource.create(RandomSource.SPLIT_MIX_64); > CachedLongProvider rng = new CachedLongProvider(provider); > // Uses cached nextLong() 64 times > rng.nextBoolean(); > // Uses cached nextLong() twice > rng.nextInt(); > IntProvider provider = RandomSource.create(RandomSource.KISS); > CachedIntProvider rng2 = new CachedIntProvider(provider); > // Uses cached nextInt() 32 times > rng2.nextBoolean(); > // This could be wrapped by a factory method: > UniformRandomProvider rng = CachedUniformRandomProviderFactory.wrap( > // Any supported source: IntProvider or LongProvider > RandomSource.create(RandomSource...)); > {code} > The implementation should be speed tested to determine the benefit for > {{nextBoolean()}} and if {{nextInt()}} can be improved for {{LongProviders}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)