lua-users home
lua-l archive

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


Hi,

> Great tool is tolua!
> 
> My question is abou performance: Is someone using tolua in real 
> projects? (games, applications)

if you consider a large computer vision tracking framework a "real"
application, then yes. In our experience, the function call overhead
of tolua is not insubstantial. The type checking, especially in
overloaded functions, can take up some time, so I do not recommend
calling a tolua function in a tight, inner loop.

The other thing is that the ownership handling mechanism of tolua is
very slow. In its current form, it forces a garbage collection every
single time that you take ownership of an object. The implications
for time-critical code are:

1. Avoid return by value functions, except for primitive data types,
because these imply taking of ownership.

2. Avoid tolua.takeownership, use tolua's new() and delete() instead.

- Christian