[ 
https://issues.apache.org/jira/browse/RNG-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16868448#comment-16868448
 ] 

Alex D Herbert commented on RNG-104:
------------------------------------

{quote}I don't understand why you changed it
{quote}
The original estimate was a demonstration that the period is large enough. It 
used a made up time of 0.1 nanoseconds per {{long}}. The new estimate uses the 
time from the benchmark (15ns/long). That is the only difference.

I'll not do an estimate for array generation. Times are roughly 400 ns per 128 
longs so 3.1 ns/long but this is without synchronisation overhead. That will 
slow it down a bit.

I'll create a ticket to make the changes to the NumberFactory.

 

> SeedFactory seed creation performance analysis
> ----------------------------------------------
>
>                 Key: RNG-104
>                 URL: https://issues.apache.org/jira/browse/RNG-104
>             Project: Commons RNG
>          Issue Type: Task
>          Components: simple
>    Affects Versions: 1.3
>            Reporter: Alex D Herbert
>            Assignee: Alex D Herbert
>            Priority: Minor
>         Attachments: t1.jpg, t4.jpg, well_lock_vs_sync1.png, 
> well_lock_vs_sync4.jpg, well_sync_performance.jpg, 
> well_unfair_performance.jpg, well_unfair_vs_fair.jpg, xor_unfair_int1.png, 
> xor_unfair_long1.png
>
>
> The SeedFactory is used to create seeds for the random generators. To ensure 
> thread safety this uses synchronized blocks around a single generator. The 
> current method only generates a single int or long per synchronisation. 
> Analyze the performance of this approach. The analysis will investigate 
> generating multiple values inside each synchronisation around the generator.
> This analysis will also investigate methods to supplement the SeedFactory 
> with fast methods to create seeds. This will use a fast seeding method to 
> generate a single long value. This can be a seed for a SplitMix generator 
> used to create a seed of any length.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to