Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Think about Isaac{,64}Rng #15

Closed
nagisa opened this issue Feb 12, 2015 · 3 comments
Closed

Think about Isaac{,64}Rng #15

nagisa opened this issue Feb 12, 2015 · 3 comments
Labels
B-API Breakage: API

Comments

@nagisa
Copy link
Contributor

nagisa commented Feb 12, 2015

Currently we provide two versions of Isaac RNG, namely a 32-bit and 64-bit version. One fitting the machine word size was previously (before #14) chosen automagically by StdRng. This means currently using a matching IsaacRng version needs to use #[cfg] conditional comments in the client code.

We need to decide whether we want to remove Isaac*Rng from the rand crate or rename current IsaacRng to Isaac32Rng and add IsaacRng which selects the best implementation.

@huonw
Copy link
Contributor

huonw commented Feb 12, 2015

These names are chosen to reflect the names of the algorithms, which are ISAAC and ISAAC64 respectively. (That's not to say we can't deviate, but it is a bit of weight toward the status quo.)

@alexcrichton alexcrichton added the B-API Breakage: API label Jun 14, 2017
@pitdicker
Copy link
Contributor

An update an the oldest open issue in rand:

#14 was merged in a next branch, which is not the direction rand is going (b.t.w. @dhardy, is there any use in keeping that branch?).

Interestingly ISAAC-64 is faster than ISAAC on 32-bit, see dhardy#53. The only advantage of ISAAC over the 64-bit version is that it uses half the memory. We still have IsaacWordRng to select the version native to the architecture though.

We need to decide whether we want to remove Isaac*Rng from the rand crate or rename current IsaacRng to Isaac32Rng and add IsaacRng which selects the best implementation.

@dhardy
Copy link
Member

dhardy commented Jan 9, 2018

Interestingly ISAAC-64 is faster than ISAAC on 32-bit, see dhardy#53

You're probably benchmarking only modern Intel CPUs? ARMv7 for one might be quite different.

No, we probably don't want that branch; the point of thread_rng is to be a good compromise between security and speed. (So probably we also want something like StrongRng in rand if we don't expose the algorithms by name.)

Lets close this; the current names are good enough and we may well remove them from rand.

@dhardy dhardy closed this as completed Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-API Breakage: API
Projects
None yet
Development

No branches or pull requests

5 participants