lua-users home
lua-l archive

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


> 1. It looks like the default LUA_BUFFERSIZE, which seems to be impacting
> max stack size the most, is relatively large---2048 bytes when
> LUA_32BITS is set (or 8192 otherwise). Is it safe to make this smaller?
> If so, by how much and are there any invariants this size must adhere to?

(LUA_BUFFERSIZE -> LUAL_BUFFERSIZE)

In test mode, LUAL_BUFFERSIZE is defined as 23 and all works fine. So, it
is safe to make it small. But it can be inefficient: Buffer manipulation
with data larger than LUAL_BUFFERSIZE is reasonably more expensive. (Most
functions in the string library use buffers to produce their string
results, for instance.) But something like 500 bytes or even 250~300 seems
quite reasonable.

-- Roberto