Lua In Real Time Programs

lua-users home
wiki

Showing revision 13
VersionNotice: This article relates to an earlier version of Lua. Incremental garbage collection is available as of Lua 5.1.

As it is now, Lua is not well-suited for (the main loops of) real-time programs. The reason isn't that Lua is slow-- in fact it probably has the fastest virtual machine of any scripting language. The problem is the mark-and-sweep garbage collection, which requires a concentrated chunk of CPU time proportional to the number of objects allocated.

It would be useful replace the mark-and-sweep collector with a real-time incremental system (see paper Real-Time Non-Copying Garbage Collection [1]). In the meantime there are still several ways to make good use of Lua in real-time programs:


See also: OptimisationTips , GarbageCollection , ProfilingLuaCode , GarbageCollectionInRealTimeGames
RecentChanges · preferences
edit · history · current revision
Edited January 11, 2007 2:54 am GMT (diff)