commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Barger <ar...@bargr.net>
Subject Re: [rng] Usefulness of benchmarks
Date Sun, 04 Sep 2016 12:20:39 GMT
On Sun, Sep 4, 2016 at 3:01 PM, Gilles <gilles@harfang.homelinux.org> wrote:

> "RandomStressTester" is in Commons _Rng_ "src/userguide" example
> code, while I've just committed "RandomNumberGeneratorBenchmark"
> in Commons _Math_ userguide examples (branch "develop").
>
> There is a README in "src/userguide"; basically, you'd run with a
> command similar to:
>
>   $ mvn -q exec:java \
>    -Dexec.mainClass=org.apache.commons.math4.userguide.rng.RandomNumberGeneratorBenchmark
> \
>    -Dexec.args="MT ISAAC JDK"
>
> where the "exec.args" contains a list of "RandomSource" identifiers.
>
>
​I've ​got following results and they look similar to ones you have in the
table :/

Java 1.8.0_101
Runtime 1.8.0_101-b13
JVM Java HotSpot(TM) 64-Bit Server VM 25.101-b13
nextInt() (calls per timed block: 1000000, timed blocks: 500, time unit: ms)
                       name time/call std dev total time ratio   cv
difference
                 j.u.Random 1.390e-05 4.2e-06 6.9486e+03 1.000 0.30
0.0000e+00
o.a.c.r.i.s.MersenneTwister 1.129e-05 3.9e-06 5.6437e+03 0.812 0.34
-1.3049e+03
    o.a.c.r.i.s.ISAACRandom 1.611e-05 3.7e-06 8.0537e+03 1.159 0.23
1.1052e+03
      o.a.c.r.i.s.JDKRandom 1.634e-05 3.4e-06 8.1704e+03 1.176 0.21
1.2218e+03
nextDouble() (calls per timed block: 1000000, timed blocks: 500, time unit:
ms)
                       name time/call std dev total time ratio   cv
difference
                 j.u.Random 2.608e-05 4.3e-06 1.3042e+04 1.000 0.17
0.0000e+00
o.a.c.r.i.s.MersenneTwister 2.099e-05 3.9e-06 1.0497e+04 0.805 0.19
-2.5450e+03
    o.a.c.r.i.s.ISAACRandom 2.381e-05 3.8e-06 1.1905e+04 0.913 0.16
-1.1367e+03
      o.a.c.r.i.s.JDKRandom 2.922e-05 4.5e-06 1.4612e+04 1.120 0.15
1.5705e+03
nextLong() (calls per timed block: 1000000, timed blocks: 500, time unit:
ms)
                       name time/call std dev total time ratio   cv
difference
                 j.u.Random 2.436e-05 3.9e-06 1.2180e+04 1.000 0.16
0.0000e+00
o.a.c.r.i.s.MersenneTwister 1.890e-05 3.4e-06 9.4501e+03 0.776 0.18
-2.7297e+03
    o.a.c.r.i.s.ISAACRandom 2.169e-05 4.1e-06 1.0845e+04 0.890 0.19
-1.3352e+03
      o.a.c.r.i.s.JDKRandom 2.743e-05 4.7e-06 1.3713e+04 1.126 0.17
1.5330e+03


Best regards,
                      Artem Barger.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message