3 ms·
I would have thought so, once the code has been called a few times the JIT will kick in. There will be a small overhead for actually making the C to Lua call, w
by justincormack 15y ago
I would have thought so, once the code has been called a few times the JIT will kick in. There will be a small overhead for actually making the C to Lua call, which you can't get rid of, unlike the other way round where you can call C from Lua with the FFI with no overhead.
If you want to see what the overhead is, the Lua module for Nginx is comparable if you compile with LuaJIT, should be fairly easy to benchmark just adding a small bit of code. Actually I tend to use this combination instead of Varnish where I actually want to mess with stuff, like do authentication while processing requests etc.
- StavrosK 15y agoI can imagine how this would be extremely beneficial in terms of ease-of-use. I hope someone creates a lua module for Varnish using VMOD, which I don't think should be very hard. Maybe I should give it a shot, actually.