[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Trace compilation from embedded LuaJIT
- From: Douglas Creager <dcreager@...>
- Date: Wed, 3 Aug 2011 21:02:10 -0400
> How about moving the data processing loop into Lua (for both the custom Lua
> callbacks and any other C callbacks).
> while true do
> local record = get_next_record()
> if not record then return end
> -- call call all c/lua per-record callbacks
> for i=1,#callbacks do
> -- cleanup record
> If you are worried about the speed when not using LuaJIT, then have another
> version of that loop written in C.
Yeah, we're looking at that as a solution, too, though it would involve rewriting a fair bit of existing C code in Lua. I wanted to see if there were alternative suggestions before we went too far down that path.