commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Commented] (RNG-37) Ziggurat algorithm
Date Fri, 08 Dec 2017 14:39:00 GMT


Gilles commented on RNG-37:

Hi [~cur4so].

I ran the benchmark; table is available in the [userguide|;a=blob_plain;f=src/site/apt/userguide/rng.apt;hb=5b88619b732e0d556e61a48b8fbb8d628bf16ea8]
(commit 5b88619b732e0d556e61a48b8fbb8d628bf16ea8).

Better performance was expected; however, although a {{double}} value is computed, it seems
that 64-bits sources lost their edge.
Indeed, for each sample, the implementation calls {{nextInt()}} and keeps only 7 bits out
of the 32 (resp. 64) that were computed by the underlying source.
I wonder whether performance could be improved if we kept bits for reuse at the next call
to {{sample()}}...

> Ziggurat algorithm
> ------------------
>                 Key: RNG-37
>                 URL:
>             Project: Commons RNG
>          Issue Type: Wish
>            Reporter: Gilles
>            Priority: Minor
> Fast algorithm for sampling a Gaussian distribution:

This message was sent by Atlassian JIRA

View raw message