lua-users home
lua-l archive

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



On Jun 16, 2004, at 19:04, Yann Com-Nougue wrote:

	
	Hi, I've been trying to find ways to optimize the time it takes to
do one mark and sweep cycle on my project, long post below...

	The game I`m working on has a very high table/node count.  I'm
talking around 10 000 hash tables and 120 000 Nodes.  This takes a
relatively long time to traverse and causes the frame rate to drop
significantly when when doing a gc cylce ( it takes around 33ms to do the
complete gc ).

	I've been thinking about "quick and easy" solutions to improve this.

Absolutely the first thing to do, because it is usually fairly easy, is to change your memory allocator.

Zorn's little list is a reasonable place to start:

http://www.cs.colorado.edu/~zorn/Malloc.html

Some memory allocators can be 10 times slower than others. The sweep phase of the GC is "free" intensive.

To be honest I doubt it will reduce your 33ms pause much, but it should be fairly easy to try.

David Jones