lua-users home
lua-l archive

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


Have you profiled the difference in your application? How much more
performance you get by removing the debug stuff?

Jani Kajala

----- Original Message -----
From: "Benoit Germain" <>
To: "Multiple recipients of list" <>
Sent: Friday, September 06, 2002 5:10 PM
Subject: conditional compilation of debug facilities in LUA core

> Hi all (well, game developers might be more specifically concerned, I
> I was thinking that when using LUA as a scripting extension for a game,
> the scripts are debugged they will not change, because the scripting
> won't be exposed to the player (unless you use LUA as a console language).
> In that case, all the debug stuff is no longer necessary, as well as the
> hook mechanism. Therefore, in order to make LUA leaner and faster, it
> be interesting to be able to compile the core with all this being
> Of course the setjmp/longjmp mechanism should remain, but testing for a
> count hook at each VM instruction, and keeping lua_Debug structure
> in some places is something I would want to be able to control, for
> by commenting out a -DLUA_REFLEXIVEDEBUG directive in the config file...
> I guess this shouldn't be too much work for anybody, but if this could
> become a feature of the official lua distribution, it would spare many of
> the throes of despair at not having found all the places to touch, and of
> doing all this all over again when upgrading.
> I suppose that it would mean that the associated compiler would be unable
> generate unstripped bytecode files, and that a virtual machine without
> facilities would have to fail gracefully upon being handled a precompiled
> file with debug infos (even if crashing would'nt bother me too much).
> Anybody with me to convince the authors to include this feature in 5.0
> :-) ?
> Cheers,
> Benoit.