lua-users home
lua-l archive

Re: Fastest way to transfer data from C to Lua ?

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


Agreed, and you could even wrap it up into a nice virtual table with a metatable binding/unbinding the pairs so they LOOKED like (x,y) pairs to a consumer. Ain't Lua great? :)
--Tim
On Jun 7, 2013, at 9:10 AM, David Heiko Kolf <david@dkolf.de> wrote:
> Tim Hill wrote:
>> 
>> And yes, the code is FAR less readable. Also, of course, if you do use
>> this method, the whole keys vs indices argument goes away.
> 
> Storing it in a few big arrays would also be my suggestion and I guess
> it could also be quite readable:
> 
> myTime = mySamples.time[434]
> myValue = mySamples.value[434]
> 
> Best regards,
> 
> David Kolf
> 
> 

AltStyle によって変換されたページ (->オリジナル) /