4 ms·
Two reasons: 1. Lua is very easy to embed into C code. Python and Ruby, not even in the same ball park ... 2. This nginx+lua config is often implemented using
by FraaJad 14y ago
Two reasons:
1. Lua is very easy to embed into C code. Python and Ruby, not even in the same ball park ...
2. This nginx+lua config is often implemented using LuaJIT. Luajit is the fastest dynamic language. it's speed is very close to Java's in many cases. So, very little performance penalty..
- slurgfest 14y agoAre there real numbers showing that the Python interpreter's performance would be unsuitable for this purpose? (How about pypy's, since JIT seems to be one of the keywords here?) Or has it been decided (as if a priori) that Lua is the only workable solution?
- ansible 14y agoIs Python unsuitable? No, it can probably be made to work. It is just a question of performance, and effort needed to integrate it. Will a Python implementation run slower and use more memory than a Lua one? Probably. what other requirements were you thinking of that would be helped with a Python implementation? You don't need to be afraid of Lua. It is a nice little language, kind of like a Scheme wrapped in a Python syntax.