lua-users home
lua-l archive

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


On Fri, Jun 22, 2012 at 4:54 AM, Miles Bader <miles@gnu.org> wrote:
To get a bit better idea I tried the a simple benchmark that just
calls "strcmp" a bunch of times (on varying strings) in a loop.  I
then wrote an equivalent "classic Lua C module", and tried that
too.  I imagine this mostly measures the speed of the argument
marshalling etc in LuaFFI.

In this simple test LuaFFI didn't do too bad; the "classic Lua C
module" version is only about three times as fast as the "LuaFFI"
version (in LuaJIT, of course, the FFI benchmark is about 10 times
faster than the "classic Lua C module").

That's pretty decent in my books, considering I have spent no effort in trying to get luaffi fast so far. All the effort up to now has been for correctness.