Redis supports lua scripting. Using eval command, we can execute a lua script in redis. Is the lua script compiled or interpretted when redis calls a lua script?
Is lua called from redis interpretted or compiled?
Asked Answered
What do you believe the difference between those two would be in this case? What question are you really trying to ask? –
Culley
Lua scripts sent to the Lua library for execution are always compiled to Lua VM instructions before execution. These instructions are then interpreted by the Lua VM.
Here intro2libsys.info/introduction-to-redis/lua-scripting it is written that redis has a lua interpreter. Does it mean that when redis makes a call to execute a lua script, it is interpretted and not compiled? –
Canonry
Redis wraps your script into a function and uses
luaL_loadbuffer
as you can see here. –
Teuton Good to know actually! And the compilation should be done only once as you send only SHA1 for next lua calls. –
Phaidra
© 2022 - 2024 — McMap. All rights reserved.