[
https://issues.apache.org/jira/browse/RNG-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17398613#comment-17398613
]
Gilles Sadowski commented on RNG-161:
-------------------------------------
{quote}i need reseeding every time that create the number
{quote}
Could you please describe your usage?
Why can't you call save/restore (as per Alex's explanation and the
[RandomSource API
documentation|https://commons.apache.org/proper/commons-rng/commons-rng-simple/javadocs/api-1.3/org/apache/commons/rng/simple/RandomSource.html])
in place of {{setSeed}}?
{quote}the way that Commons RNG supply, it's very slow
{quote}
According to our
[benchmarks|https://commons.apache.org/proper/commons-rng/userguide/rng.html#a4._Performance],
most of the library's implementations outperform the {{java.util.Random}}
class (method {{getBoolean()}} excepted).
{quote}i couldn't accept the speed !!!
{quote}
How did you measure it?
Our design is based on (what we think is) the most common (correct) usage.
Please give more details about yours.
Also: Note that the JDK's {{java.util.Random}} has [_many_
"defects"|https://commons.apache.org/proper/commons-rng/userguide/why_not_java_random.html].
> 是否可以动态设置seed?
> -------------
>
> Key: RNG-161
> URL: https://issues.apache.org/jira/browse/RNG-161
> Project: Commons RNG
> Issue Type: Improvement
> Components: client-api
> Affects Versions: 1.3
> Reporter: sun
> Priority: Major
>
> Does Commons RNG can set the seed by method,isn't use
> RandomSource.create,like random.setSeed() to set the seed ?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)