From: davidsen@tmr.com (bill davidsen)
To: linux-kernel@vger.kernel.org
Subject: Re: [RFC] frandom - fast random generator module
Date: 21 Oct 2003 19:46:24 GMT [thread overview]
Message-ID: <bn42eg$ic9$1@gatekeeper.tmr.com> (raw)
In-Reply-To: 20031016144205.I7000@schatzie.adilger.int
In article <20031016144205.I7000@schatzie.adilger.int>,
Andreas Dilger <adilger@clusterfs.com> wrote:
| On Oct 16, 2003 21:28 +0200, Eli Billauer wrote:
| > Allow me to supply a couple facts about frandom:
| >
| > * It's not a "crappy" RNG. Its RC4 origins and the fact, that it has
| > passed tests indicate the opposite. A fast RNG doesn't necessarily mean
| > a bad one. I doubt if any test will tell the difference between frandom
| > and any other good RNG. You're most welcome to try.
|
| The "crappy RNG" being referred to is just some code we implemented to
| give us somewhat unique numbers instead of sucking CPU.
|
| > * Frandom is written completely in C. On an i686, gcc compiles the
| > critical part to 26 assembly instructions per byte, and I doubt if any
| > hand assembly would help significantly. The algorithms is clean and
| > simple, and the compiler performs well with it.
|
| This is still more expensive than a hw RNG (which will be about 1 ins
| per 4 bytes), so it would be nice to make this arch-specific if possible
| (runtime and compile time).
Clearly that's true inside the kernel. Although the speed will be
somewhat less because you may not always need four bytes, no?
The benefit of a random number source user programs can use, which is
going to avoid giving the same number to multiple processes or threads
is significant for simulations and sampling. It doesn't matter if this
is done with frandom or speeding urandom to similar speed, other than
that some people will protest a change in urandom, even a change for the
better.
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
next prev parent reply other threads:[~2003-10-21 19:56 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <HbGf.8rL.1@gated-at.bofh.it>
[not found] ` <HbQ5.ep.27@gated-at.bofh.it>
[not found] ` <Hdyv.2Vd.13@gated-at.bofh.it>
[not found] ` <HeE6.4Cc.1@gated-at.bofh.it>
[not found] ` <HjaT.3nN.7@gated-at.bofh.it>
[not found] ` <Hjkw.3Al.11@gated-at.bofh.it>
2003-10-16 17:46 ` [RFC] frandom - fast random generator module David Mosberger-Tang
2003-10-16 19:28 ` Eli Billauer
2003-10-16 20:42 ` Andreas Dilger
2003-10-21 19:46 ` bill davidsen [this message]
2003-10-16 21:30 ` Matt Mackall
2003-10-16 8:22 Eli Billauer
2003-10-16 8:36 ` Nick Piggin
2003-10-16 10:20 ` Eli Billauer
2003-10-16 10:48 ` Nick Piggin
2003-10-16 11:29 ` Jeff Garzik
2003-10-16 12:27 ` Eli Billauer
2003-10-16 15:10 ` Jeff Garzik
2003-10-16 16:20 ` Andreas Dilger
2003-10-16 16:31 ` Jeff Garzik
2003-10-16 18:18 ` Andreas Dilger
2003-10-16 18:52 ` Richard B. Johnson
2003-10-16 19:31 ` Matt Mackall
2003-10-16 20:40 ` Andreas Dilger
2003-10-16 21:03 ` David Wagner
2003-10-16 23:17 ` Jeff Garzik
2003-10-16 23:42 ` Andreas Dilger
2003-10-17 0:34 ` David Wagner
2003-10-16 17:45 ` Matt Mackall
2003-10-16 18:38 ` Andreas Dilger
2003-10-16 19:08 ` Matt Mackall
2003-10-16 20:27 ` Andreas Dilger
2003-10-16 20:37 ` Matt Mackall
2003-10-16 17:31 ` Matt Mackall
2003-10-16 23:03 ` Eli Billauer
2003-10-16 23:07 ` Jeff Garzik
2003-10-16 23:13 ` Matt Mackall
2003-10-16 23:35 ` jw schultz
2003-10-21 19:24 ` bill davidsen
2003-10-21 19:55 ` bill davidsen
2003-10-21 21:21 ` Helge Hafting
2003-10-21 22:18 ` bill davidsen
2003-10-22 1:04 ` H. Peter Anvin
2003-10-21 19:17 ` bill davidsen
2003-10-21 21:00 ` H. Peter Anvin
2003-10-21 22:08 ` bill davidsen
2003-10-22 1:06 ` H. Peter Anvin
2003-10-22 2:56 ` jw schultz
2003-10-22 16:22 ` Kent Borg
2003-10-23 2:46 ` Dale Farnsworth
2003-10-23 3:22 ` Sandy Harris
2003-10-23 14:15 ` Kent Borg
2003-10-24 17:37 ` bill davidsen
2003-10-24 17:54 ` Theodore Ts'o
2003-10-24 20:59 ` David Wagner
2003-10-24 21:33 ` jw schultz
2003-10-22 3:49 ` Sandy Harris
2003-10-16 10:45 ` Ingo Oeser
2003-10-21 19:30 ` bill davidsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='bn42eg$ic9$1@gatekeeper.tmr.com' \
--to=davidsen@tmr.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).