lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Lua 5.4.4 random number generator is based/or xoshiro256.

If you will build lua from source maybe mt19937 be a good choice.

about high-resolution time checkout http://lua-users.org/wiki/HiResTimer


http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
https://github.com/MersenneTwister-Lab/TinyMT





---- Em Qua, 15 mar 2023 06:54:07 -0300 bil til <biltil52@gmail.com> escreveu ---

If you use the compiled version of Lua inside your source code (NOT
pre-linked, as e. g. Windows-DLL), this usually is no problem, just
look for the randomize functions and place some breakpoint there.

... I ran into this some months ago (my controller also has a special
analogue random generator) - these are not many points you have to
change (I think only two...).

(If I have the answers on my questions here correctly in mind, this
randomization is done mainly as a "random source" for the hash code
generation, which is needed to speed up access to the string tables /
for string equality checking... . To avoid "evil hackers" to flood Lua
with some "predefined set of strings" which then would somehow "flood
the hash table concept" / "make it unusable".)