S
S
Spooky 20202021-09-24 16:02:45
C++ / C#
Spooky 2020, 2021-09-24 16:02:45

Is there a faster random number generator than the standard rand()?

I need a faster option than the standard rand function.
I think there must be something faster, whether in C or C++.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-09-24
@spooky_2020

I remembered:
random_number.png
But seriously, it depends on the task: you need to get real random numbers, or just create a feeling of randomness in the user.
The fastest will be the non-random random, which simply returns a number and a predetermined sequence.
The slowest is a real random based on some kind of physical effect. (for example, throwing a die)
https://habr.com/ru/post/499490/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question