[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Future of tolua
- From: Waldemar Celes <celes@...>
- Date: Thu, 17 Jun 2004 16:06:41 -0300
Is tolua optimized enought to be (very much) used in
a real time game?
Are there some "performance tips" or "good tolua
programming guidelines" you could share with us?
I believe tolua can perform very fast. It mainly wastes time
for checking parameter types. However, with tolua 5.0, you
can define the constant TOLUA_RELEASE for compiling the
binding code with no type checking. Of course, you should only
turn off the checking after ensuring the functions/methods are
being called with the correct parameters.
With that, you cannot use overloaded functions, because it
require run-time type checking.
For good performance, you should also avoid returning structs by values
and receiving arrays as parameters (both require dynamic memory allocation).
Finally, the generated binding code is long and it can be a problem for
binding large APIs
due to large code size; however, it does not impose run-time performance
Hope it helps.