[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LuaHashMap: An easy to use hash table library for C (release candidate)
- From: Sven Olsen <sven2718@...>
- Date: Fri, 28 Dec 2012 10:21:55 -0500
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