2 ms·
True, although Python and Ruby are extreme cases here. PHP is JIT'd these days, and can be quite a bit faster on this kind of numerical code. JavaScript even mo
by nicoburns 6y ago
True, although Python and Ruby are extreme cases here. PHP is JIT'd these days, and can be quite a bit faster on this kind of numerical code. JavaScript even more so. I've seen posts on r/rust asking why their Rust port wasn't faster than the JS version, and it turned out not to be lack of optimisation, it was just simple numerical code (doesn't require allocation) which is already super-optimised by modern JS engines.
- igouy 6y agoMJIT https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/ https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-rele... (Also pypy)
- Rochus 6y agoThe performance gain of the MRI Ruby JIT is not really impressive, see e.g. http://software.rochus-keller.info/are-we-fast-yet_crystal_ruby_2_3_lua_node_i386_results_2020-12-23.pdf http://software.rochus-keller.info/are-we-fast-yet_crystal_r.... Actually also the factor 4 PyPy speed-up in geomean is not that much overall (e.g. compared to V8).
- igouy 6y agoBut it's existence is sufficient to add Ruby to the "is JIT'd these days" list.