4 ms·
I understand that this project is very immature compared to Node.js, but how does it compare performance-wise? Can modern Lua virtual machines outperform V8?
by josephg 15y ago
I understand that this project is very immature compared to Node.js, but how does it compare performance-wise?
Can modern Lua virtual machines outperform V8?
- willvarfar 15y agoYou mean how fast can it compute fib(40) without memorization? ;)
- Yakulu 15y agoThe only thing I see if from the official Github page : "This project is still under heavy development, but it's showing promise. In initial benchmarking with a hello world server, this is between 2 and 4 times faster than nodeJS." Memory usage should be lower too.
- creationix 15y agoIndeed. In that benchmark I did, it was 2 times faster on 32-bit linux and 4 times faster on 64-bit linux. In both the Luvit version used about 40x less ram. Also startup time is much faster in Luvit. This doesn't matter as much for servers, but for embedded devices like writing webOS games for the TouchPad, it makes all the difference in the world! Node depending on how you build it can take between 300 and 1000 ms of time and 10Mb of ram to just start up on the TouchPad. Luvit starts instantly and uses much less ram. Larger programs are needed to see how the memory usage and performance scales with real work. That could be completely different.
- gregholmberg 15y agoLua uses memory efficiently at scale. I have used Lua at the command line on machines with 64GB of RAM to do ad hoc data mining that would have otherwise required several days of prep time for writing and debugging C before each run. Using Lua, I could do things in hours that used to take overnight, or several days.
- luastoned 15y agoLuaJIT could do this a long time ago already http://news.ycombinator.com/item?id=1187901 http://news.ycombinator.com/item?id=1187901
- luastoned 15y agoAlright after some research I fould that LuaJIT is way faster than V8: V8: node fib.js 6.40s user 0.02s system 99% cpu 6.423 total LuaJIT: ./luajit fib.lua 2.02s user 0.00s system 99% cpu 2.026 total http://www.saltwaterc.eu/but-the-question-is-will-it-recur-part-1-fibonacci40.html http://www.saltwaterc.eu/but-the-question-is-will-it-recur-p...
- deleted 15y ago[deleted]
- dextorious 15y ago"I understand that this project is very immature compared to Node.js" Good thing you added "compared" there, because I wouldn't call Node.js exactly "mature".
- creationix 15y agoIt's a much leaner VM and it much faster and uses less memory in all my tests. However Lua and JS aren't the same language so real applications may show something different.