lua-users home
lua-l archive

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


> I'll just take this opportunity to pimp a C random number generator
> based on the FNV-1a hash.  Its main claim to fame is being very
> very fast, though that's probably pretty irrelevant compared to the
> overhead of calling it from Lua.  Its quality of distribution of
> pseudorandomness is also pretty respectable in casual use (though I
> don't know how it compares to MT etc).

Do you know of any comprehensive analysis of your FNV-1a 
implementation against standards for randomness?  MT isn't 
cryptographically secure (natively) either, but if FNV-1a is better 
than rand() (which shouldn't be that difficult given how bad rand() 
is), then that might be a good candidate once it's made stateless (and 
assuming the license is compatible).

Brian