5 ms·
Why do you consider Ruby to be inherently slow? I don't see why that would be the case. In fact, the performance improvements during the 2.x era seem to indica
by epidemian 6y ago
Why do you consider Ruby to be inherently slow?
I don't see why that would be the case. In fact, the performance improvements during the 2.x era seem to indicate the contrary: that Ruby can be faster.
- monadic2 6y ago> I don't see why that would be the case Well, the extensive use of “method_missing” appears to be staggeringly difficult to optimize short of a tracing jit and it’s also the core idiom of many popular frameworks. Of course it can be faster—if you remove the slow, unique features you can optimize it like any other language.
- goatlover 6y ago>> Of course it can be faster—if you remove the slow, unique features you can optimize it like any other language. And at some point you might as well use Crystal if you're going to do that, while keeping a Ruby-like syntax.
- jashmatthews 6y agoWhat makes you say that? method_missing is trivial with a tracing JIT and Chris Seaton's PhD covers how to do it for a method JIT.
- monadic2 6y agoWhich tracing jit would you recommend for production work? The implication is, of course, that there isn’t a good one. This isn’t ruby the language’s fault, it’s just weird that after like 15 years being the go-to tool for VCs there’s no substantial investment in the core infrastructure. We just gotta wait for banking software to be written in it, I guess, so there’s a vested interest in it over the long term. Edit: I’d like to further note that other languages use similar features (string-keyed functions) but they aren’t typically put into high performance code/are seen as a hack around formally definitions (possible exception: common lisp, although I would expect a macro). This is inherently a readability improvement over manually defining the methods you use.
- jashmatthews 6y agoJRuby optimizes method_missing in production right now so there's no need to wait for a tracing JIT. I hope that Shopify will start to invest more into R&D for CRuby as well now as well as having Chris there working on TruffleRuby. I'm not sure what you're trying to say with the last part because Ruby works quite differently to Lua or Self here and Self has been "fast" for 30+ years anyway.
- monadic2 6y ago> JRuby optimizes method_missing in production right now so there's no need to wait for a tracing JIT. Surely this would reflect in benchmarks? Perhaps there is an even slower aspect of the language manifesting in JRuby.... > I'm not sure what you're trying to say with the last part because Ruby works quite differently to Lua or Self here and Self has been "fast" for 30+ years anyway. Is this supposed to reflect in Ruby’s favor? Self was built to be performative in spite of its novel features—the slow aspects of the language were never encouraged to take a central role. A better equivalent might be applescript or bash or a language that emphasizes some particular quality of expressiveness.
- jashmatthews 6y agoIt does? JRuby 9.2 can be 15% (web), 25% (optcarrot), maybe 3x faster (microbenchmarking iterators) than CRuby depending on what you're doing. Did you mean messages? They're certainly a central part of Self.
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- rafaelfranca 6y ago> I hope that Shopify will start to invest more into R&D for CRuby as well now as well as having Chris there working on TruffleRuby. Hi, I'm the Manager of the Ruby and Rails Foundations team at Shopify. We are investing a lot on R&D for CRuby as well. We have 6 people working full time on Ruby implementations, both CRuby and TruffleRuby. Not only Chris Seaton is here, but we have two CRuby Core members as part of the team, Aaron Patterson being one of them.