lua-users home
lua-l archive

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


Hi,

Apologies if this is going over old ground ... I have been thinking
about how to allow fast metamethods for userdata objects. As userdata
objects are created by C code then it is possible for C code to
provide an array of C functions (like a C++ vtable) for the userdata
object - the C functions to be used as metamethods.

What would be reason for not doing it this way?

I am interested in this as I want to achieve high performance for
certain operations involving userdata types - which otherwise means I
have to make the VM recognize these types so that it can perform
operations on these types natively. However that approach isn't
scalable as enhancing the VM to recognize new types is a lot of work.

Thanks and Regards

Dibyendu