lua-users home
lua-l archive

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

Mark Hamburg wrote:
on 5/17/05 3:29 PM, Chris Marrin at wrote:

Right, which is why I suggested that userdata be made into an opaque
pointer. That at least makes a programmer using good practice less
likely to do harm. Using this had a phenomenal effect on the performance
of my system, which I why I think it is an important tool for Lua-C

Did this really speed up your system or just your benchmarks of how fast you
could push an object from C++ to Lua? After getting slapped around a bit on
the list for doing essentially what you did, I had to admit that push time
wasn't a major factor in most of my profiling however it was implemented.

I am doing a lot of pushing of the C++ instance so Lua can access it. So yes, this was an accurate test case. I understand that there are workarounds. But all of them seem very C++ programmer unfriendly and we are trying to make it easy on C++ programmers to add objects to the system that are accessible from Lua and vice versa...

chris marrin                ,""$,          b`    $                             ,,.
                        mP     b'                            , 1$'
        ,.`           ,b`    ,`                              :$$'
     ,|`             mP    ,`                                       ,mm
   ,b"              b"   ,`            ,mm      m$$    ,m         ,`P$$
  m$`             ,b`  .` ,mm        ,'|$P   ,|"1$`  ,b$P       ,`  :$1
 b$`             ,$: :,`` |$$      ,`   $$` ,|` ,$$,,`"$$     .`    :$|
b$|            _m$`,:`    :$1   ,`     ,$Pm|`    `    :$$,..;"'     |$:
P$b,      _;b$$b$1"       |$$ ,`      ,$$"             ``'          $$
 ```"```'"    `"`         `""`        ""`                          ,P`
"As a general rule,don't solve puzzles that open portals to Hell"'