lua-users home
lua-l archive

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

2012/1/22 steve donovan <>:
> So this is the performance bottleneck; LuaJIT's math.random is an
> optimized fast call.  So the Lua/C boundary is penalizing your other
> random generator.

Well, this should'n be the case because we call the RNG functions
directly using the FFI interface and therefore there shouldn't be any
performance panalty.

> Just a thought: how about coding the random number generator directly in Lua?

Well, there should be no need because the algorithm does not require callbacks.