lua-users home
lua-l archive

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


On 17 February 2011 10:27, Christian Tellefsen
<christian.tellefsen@funcom.com> wrote:
>
> If you want fast vector ops, wouldn't it better to use LuaJIT FFI for the
> vectors? Then you can just store the 3 floats in a vector in native C
> instead of using Lua tables. Should keep memory usage down and speed things
> up a lot.

I don't see how that get you out of writing loops over these arrays.
Francesco's example has an FFI variant too, and it doesn't help in
this case (in fact it is much worse).

Cheers,

Tomek