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

Excise MersenneTwister #51513

Open
PallHaraldsson opened this issue Sep 29, 2023 · 4 comments
Open

Excise MersenneTwister #51513

PallHaraldsson opened this issue Sep 29, 2023 · 4 comments
Labels
randomness Random number generation and the Random stdlib

Comments

@PallHaraldsson
Copy link
Contributor

It seems like we can and maybe should do it. Likely most aren't using, rather the new default RNG automatically, for some years now.

I'm not sure it takes (much) space in the sysimage (and/or Random) for little gain. It could always be added back, or lazy loaded.

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Sep 29, 2023

I do see additionally (and is this DSFMT only used by MersenneTwister, and also taking up too much space/time?):

include("DSFMT.jl")

using .DSFMT
using Base.GMP.MPZ
using Base.GMP: Limb

I didn't look up what GMP is used for, but it seems not to to allow generating random rand(BigInt) didn't work for me, so for MT? I actually want to excise BigInt/GMP also but not all in one go... and also BigFloat, not now but earlier. ArbNumerics.jl is better, all should be using that. Is rand(BigFloat) terribly important to most people?

@vchuravy
Copy link
Member

I think the right pathway is to excise random #51432

@andrewjradcliffe
Copy link
Contributor

MT should be eliminated for more reasons than just sysimage size.

@PallHaraldsson
Copy link
Contributor Author

PallHaraldsson commented Sep 30, 2023

I think the right pathway is to excise random #51432

Isn't that about making Random an (upgradable? is that needed?) stdlib? Anyway it would keep MT there?

MT should be eliminated for more reasons than just sysimage size.

Given that, could we "lie" to users (to sort of not break code) with (but document in NEWS?):

const MersenneTwister = Xoshiro # and deprecate it right away, I think it's not yet done.

I mean we could, and most users wouldn't care..., most don't user it currently any more, would some opt into it for a good reason or out of ignorance?

If someone really needs MersenneTwister (exact stream on those random numbers) it could be added back with a package MersenneTwister.jl.

@ViralBShah ViralBShah added the randomness Random number generation and the Random stdlib label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
randomness Random number generation and the Random stdlib
Projects
None yet
Development

No branches or pull requests

4 participants