Page 1 of 1

Does size of Lua memory usage impact model speed?

Posted: Wed Jul 08, 2020 9:47 am
by jkgarner
Here is a question:

Say I develop a bunch of Lua functions (say a library) and load them into the Lua memory state.

Is there a point at which the size of the Lua memory state impacts the speed of the model?

Currently my lua script file is at about 800K of text. I have not noticed speed degredation. I understand that all comments are stripped out upon reading (about 20% of text) and there is a precompilation, so the actual size in momory may be significantly smaller than 800K.

What if my library script were to grow to 3 Meg? Would it impact the model speed? Have there been any tests along these lines? If so, what have they revealed?


I suspect that script file size is less important than memory usage...
I could have a 5 line script that generates a table that is megabytes in size. So, in addition to the tests suggested above, are there tools to examine Lua state size and memory usage?