Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-09 Thread Gilles
> [...] That proposal would 1. fix the performance issue reported in MATH-1154, this proposal would only fix it in 4.0, as we can not remove the rng references in the distribution classes immediately. There is not a single way I can oppose what you say: This cannot be a good day! Th

Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-09 Thread Thomas Neidhart
On Thu, Oct 9, 2014 at 12:08 PM, Gilles wrote: > Hi. > > On Wed, 08 Oct 2014 21:45:30 +0200, Luc Maisonobe wrote: > >> Le 08/10/2014 19:32, Gilles a écrit : >> >>> > [...] >>> >>> What do you think of the solution proposed in >>> https://issues.apache.org/jira/browse/MATH-1158 >>> ? >>> >>

Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-09 Thread Gilles
Hi. On Wed, 08 Oct 2014 21:45:30 +0200, Luc Maisonobe wrote: Le 08/10/2014 19:32, Gilles a écrit : > [...] What do you think of the solution proposed in https://issues.apache.org/jira/browse/MATH-1158 ? [No hidden RNG, no default RNG, no hidden performance cost or delayed initialization, s

Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-08 Thread Luc Maisonobe
Le 08/10/2014 19:32, Gilles a écrit : >> > [...] > > What do you think of the solution proposed in > https://issues.apache.org/jira/browse/MATH-1158 > ? > > [No hidden RNG, no default RNG, no hidden performance > cost or delayed initialization, similar API, ...] I may have missed something but

Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-08 Thread Phil Steitz
On 10/8/14 10:32 AM, Gilles wrote: >> > [...] > > What do you think of the solution proposed in > https://issues.apache.org/jira/browse/MATH-1158 > ? > > [No hidden RNG, no default RNG, no hidden performance > cost or delayed initialization, similar API, ...] That is basically going back to not

Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-08 Thread Gilles
> [...] What do you think of the solution proposed in https://issues.apache.org/jira/browse/MATH-1158 ? [No hidden RNG, no default RNG, no hidden performance cost or delayed initialization, similar API, ...] Regards, Gilles -

Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-08 Thread Phil Steitz
On 10/8/14 5:33 AM, Thomas Neidhart wrote: > Hi, > > in my use-cases I also use only 1 random generator with a fixed seed which > is important property as in case of simulations you want to have a > deterministic behavior for all random decisions. I tend to do the same thing. > > I am not sure if

Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-08 Thread Gilles
Hi. Sorry: I had not seen your post before adding yet another unnecessary layer of comment to the JIRA issue for MATH-1154. On Tue, 07 Oct 2014 17:38:34 -0700, Phil Steitz wrote: Comments in MATH-1154 (bad performance in test code) and the now-reopened MATH-1124 (slow initialization) point to t

Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-08 Thread Thomas Neidhart
Hi, in my use-cases I also use only 1 random generator with a fixed seed which is important property as in case of simulations you want to have a deterministic behavior for all random decisions. I am not sure if we should invest effort to make the existing random generators thread-safe, as there

Re: [math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-08 Thread Luc Maisonobe
Hi Phil, Le 08/10/2014 02:38, Phil Steitz a écrit : > Comments in MATH-1154 (bad performance in test code) and the > now-reopened MATH-1124 (slow initialization) point to the need to > fix the problem we created when we moved sample() to the > distribution classes with PRNG provided by a final fie

[math] Thread-safety and initialization overhead in distribution sample() methods

2014-10-07 Thread Phil Steitz
Comments in MATH-1154 (bad performance in test code) and the now-reopened MATH-1124 (slow initialization) point to the need to fix the problem we created when we moved sample() to the distribution classes with PRNG provided by a final field with default implementation initialized by the constructor