In the following ancient message: http://lua-users.org/lists/lua-l/2003-09/msg00066.html I outlined how to reduce memory consumption for tables by repacking the value and key. This contains one nasty bug as it turns out. One cannot use lu_byte for the type code because that value is unsigned and LUA_TNONE is -1. Using a signed char for the type codes does, however, work. Mark