4 ms·
Just fix the VM then. tinyrb based on potion based on lua with classes is ~200x faster in method calls, and has a full dynamic MOP. Common Lisp ditto. Traditio
by rurban 9y ago
Just fix the VM then. tinyrb based on potion based on lua with classes is ~200x faster in method calls, and has a full dynamic MOP. Common Lisp ditto.
Traditional optimizations don't work when the base VM is poorly designed.
Always take advice from people of failed products with a grain of salt.
- chrisseaton 9y ago> Just fix the VM then No the point isn't that the VM is broken. The point is that the Ruby language has semantics and is used in idioms that nobody knows how to optimise well yet. > tinyrb based on potion based on lua with classes is ~200x faster in method calls tinyrb is interesting, but it just isn't the same semantics as Ruby: https://github.com/macournoyer/tinyrb#what-wont-be-in-tinyrb-tiny-patches-accepted https://github.com/macournoyer/tinyrb#what-wont-be-in-tinyrb... tinyrb doesn't have a better VM - they're implementing a different programming language with all the hard bits left out! In my project we've been having to do new original research into how to optimise Ruby - introducing concepts such as dispatch chains which haven't been needed more because people don't try to push metaprogramming in most language like they do in Ruby. http://stefan-marr.de/downloads/pldi15-marr-et-al-zero-overhead-metaprogramming.pdf http://stefan-marr.de/downloads/pldi15-marr-et-al-zero-overh...
- rurban 9y agoYour interpretation of the tinyrb omissions is wrong. I'm the current maintainer of potion which is the underlying VM for tinyrb. What is missing us just sugar and peg parsing grammars for some trivial stuff. And then of course the huge stdlib. The simple potion/IO mop and ABI layout is far superior to matz ruby, just the method cache and thread support is missing. And this compiler has no optimizations at all yet, not even trivial constant folding. Still 200x faster. This lua with mop VM can be used for every dynamic language, like ruby, perl, python, PHP, ... and will beat rpython or truffle/graal by lengths. The other VM based on this tvmjit ditto. This uses even luajit with s-expressions.