Optional compilation flag to disable the property functionality?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Optional compilation flag to disable the property functionality?

T.bear
I have been using luabind for a few years, and cannot implement any
C++ binding without it.
Recently, I read about the discussions about the design difference
between OOLUA and luabind,
and realized that the nice "property" functionality comes at a cost of
having to wait twice as much for every member function/variable
look-up.
(The reason is that __index function calls into C++ to support "properties".)
So I wonder if it would be possible to add optional compilation flag
to disable the property functionality of LUABIND and bypass the
luabind's custom implementation of __index function?

p.s.
I also realized that this applies to luabind's class method too.
For example, member lookups of
class 'ASDF'
is twice as slow as the same class implemented using metatable.
I understand that in some cases, table look-ups can be avoided by
modifying, for example,

  for ...
    x:f()
  end

as

  local f = x.f
  for ...
    f(x)
  end

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user