lua-users home
lua-l archive

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


>So overall, we're finding costs of about 120k of RAM, plus a few more k
>per loaded script, and execution times running at about ten to twenty
>times that of native code.  Does that sound like the right ballpark?

This is consistent with what we say in our 1996 SPE paper:

  Lua is approximately 20 times slower than C. This seems to be a typical
  value for interpreted languages [22].

> Have you considered not linking the parser?

You can also avoid the dump module, ldump.o, by adding this to etc/noparser.c:

int luaU_dump (lua_State* L, const Proto* Main, lua_Chunkwriter w,
		void* data, int strip)
{
 lua_pushstring(L,"dumper not loaded");
 lua_error(L);
 return 0;
}

ldump.o is a small module but when every K counts it helps...

Also, like LTN 2 says:

   The first thing is to remove any standard libraries that are not
   needed. For instance, ldblib.o will probably not be needed in most
   applications.

--lhf