lua-users home
lua-l archive

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


Chris wrote:
> If I switch out that "buffer[y] = bar" assignment for the "copyfoo"
> call then it runs considerably faster.  It makes me wonder why the JIT
> can't just do what it's doing in the copyfoo function.

http://luajit.org/ext_ffi_semantics.html#status

  ...
  The following operations are currently not compiled and may
  exhibit suboptimal performance, especially when used in inner
  loops:
  
  * Array/struct copies and bulk initializations.
  ...

> Did I mess something up or what's going on here?

Nope, I didn't get around to implement it, yet. Send a patch. :-)

--Mike