I did some microbenchmarks like 2 years ago on this which I think IOn 5/9/15, Rena <firstname.lastname@example.org> wrote:
> On Sat, May 9, 2015 at 1:01 PM, Roberto Ierusalimschy
> <email@example.com> wrote:
>>> Using the C API will make LuaJIT's performance bottom out. If you're
>>> worried about performance across VMs, stick to pure Lua.
>> That is not a valid advice across VMs. C code is much faster than
>> (non-JIT) Lua code. So, not using the C API will hurt Lua performance.
>> -- Roberto
> But Lua also has some overhead with calling into C, doesn't it? So
> some common operations are faster in pure Lua than in C? I'm sure I've
> heard that.
mentioned on the list. If I recall my experiments correctly, I was
surprised that this was not the case and the calling overhead of
calling C implemented functions from Lua was faster than calling Lua