lua-users home
lua-l archive

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



My most immediate thoughts
gravitate to how to avoid the constant recreation/conversion of
strings when crossing boundaries or at least speed it up. Lua's string
internalization is interesting, but won't work across multiple Lua
states. Then there are all the threading concerns.

Yeah, it's a tangle.  In my own projects, I'm fortunate enough to be working with a single state, so it's easy to poke holes in the Lua API to avoid marshaling overhead and exploit Lua's string pool from C.  I've even added a callback function to the gc, so that I can mark strings owned by various C modules :-P

But of course, those kinds of tricks get far more complicated if you're dealing with multiple states -- so they're probably best kept as special-case hacks.

-Sven