4 ms·
When implementing a JIT I would hope for a much higher speed up than 15%. In comparison: LuaJIT with the JIT switched on runs about five times faster than the m
by Rochus 6y ago
When implementing a JIT I would hope for a much higher speed up than 15%. In comparison: LuaJIT with the JIT switched on runs about five times faster than the most recent PUC Lua interpreter, see http://software.rochus-keller.ch/are-we-fast-yet_lua_results_2020-10-12.pdf http://software.rochus-keller.ch/are-we-fast-yet_lua_results.... Compared to that 15% is nothing.
- oblio 6y agoTrue, but I would imagine that a lot more time has been invested in LuaJIT, since this is just the first release of the Ruby JIT. Plus isn't Lua better suited for optimization, from the get-go?
- Rochus 6y agoI have no information on how much time was invested in the implementation of either of the VMs. Lua has many similarities both with Smalltalk and Ruby. It has also a very powerful closure concept, which unfortunately is not yet supported by the tracing JIT.
- mercer 6y agoThe JIT efforts for Elixir/Erlang apparently offer 30% speed up, worst case, and while I'm way out of my depth here, apparently it's a relatively 'naive' implementation. I'm very curious why there isn't as much of an improvement for Ruby. Is it something to do with the extreme dynamic nature of the language?
- Rochus 6y ago> Is it something to do with the extreme dynamic nature of the language? Smalltalk/SOM, JavaScript and Lua share the "extreme dynamic nature" but still have much faster JIT implementations. From my reports you can see that V8 (Node) is about ten times and LuaJIT about five times faster than MRI Ruby 3 JIT. Here are some other performance results using the same benchmark suite: https://github.com/smarr/are-we-fast-yet/blob/master/docs/performance.md https://github.com/smarr/are-we-fast-yet/blob/master/docs/pe.... Also TruffleRuby is reported to perform much better than MRI Ruby JIT (see e.g. https://pragtob.wordpress.com/2020/08/24/the-great-rubykon-benchmark-2020-cruby-vs-jruby-vs-truffleruby/ https://pragtob.wordpress.com/2020/08/24/the-great-rubykon-b...).