37 ms·
Oh it totally matters, any sort of chatty interface over FFI you will pay for it. There's a reason a lot of gamedev uses luajit, I've personally had to refacto
by vvanders 4y ago
Oh it totally matters, any sort of chatty interface over FFI you will pay for it.
There's a reason a lot of gamedev uses luajit, I've personally had to refactor many interfaces to avoid JNI calls as much as possible as there was significant overhead(both in the call and from the VM not being able to optimize around it).
- kllrnohj 4y agoThe reason a lot of gamedev uses luajit is the ease at which it can be embedded. And that's not really even true anymore as the majority of gamedev is using Unreal or Unity, neither of which use luajit.
- vvanders 4y agoIt's not just how easy it is to embed, it's also really small in both code + runtime size. I've shipped it on systems with sub 8mb of total system memory(we used a preallocated 400kb block), until quickjs came along there really wasn't anything comparable. It was also much faster than anything else at the time and regularly beat v8 in the benchmarks I ran. Unity+Unreal are the public engines out there but there's plenty of in-house engines and tool chains you don't really hear about. I wouldn't be surprised if it's still deployed in quite a few contexts.