6 ms·
I’m surprised to see how little speed-up have happened over the years. Especially when you compare it to something like PHP which has massive gains. Seems lik
by alberth 4y ago
I’m surprised to see how little speed-up have happened over the years. Especially when you compare it to something like PHP which has massive gains.
Seems like most of the Ruby gains are related to memory usage.
- jwcooper 4y agoI think these charts are more informative, especially for Rails apps: https://speed.yjit.org/ https://speed.yjit.org/ Ruby 3.2 and production-ready YJIT feel like a big deal as someone who has been in the Rails and Ruby ecosystem for 15 years. Rails in particular has seemed to be very difficult to optimize for performance in Ruby, and YJIT seems to have done it.
- brasic 4y agoTruffleRuby is leading the pack here: https://eregon.me/blog/2022/01/06/benchmarking-cruby-mjit-yjit-jruby-truffleruby.html https://eregon.me/blog/2022/01/06/benchmarking-cruby-mjit-yj...
- mrinterweb 4y agoEvery time I try to get a project going with truffleruby, I get all kinds of dependency problems. I haven't had the patience to resolve all of the library problems yet, so I give up.
- skrtskrt 4y agoI don’t have a ton of love for Python now that I’ve moved on to static typing but it’s hard for me to see myself choosing Ruby over Python for anything. Python has gotten significantly faster, has static typing built in with an ecosystem of static typecheckers, and async is an ergonomic first class language feature - sure async can have rough edges but the 99.9% case is dead simple with no surprises. Obviously packaging for Python is still a pain but I don’t see Ruby being better
- foxandmouse 4y agoI've only ever known Javascript/ Typescript. I've been thinking of picking up ruby to learn "practical" functional programming and maybe see what the infatuation with rails is, but I'm starting to think it might be more "valuable" to learn python.
- skrtskrt 4y agoPython and Ruby are both only really as functional as you choose to use them. You’ll see more imperative code in the wild for both, though the big data stuff in Python leans more functional. Rails and Django are both still super popular from scanning job listings, so e-commerce employment wise they’re both great. FastAPI is also growing a lot. Big Data leans heavily Python
- sodapopcan 4y agoI wouldn’t recommend python or ruby if you’re trying to learn more about functional programming… you may as well stick with JS in that case (imo, at least). I’d choose a language that has at least had native immutability. Something like Elixir/Erlang, OCaml, Clojure, or F#.
- skrtskrt 4y agoI’m seeing a pretty significant amount of Elixir job listings these days even in areas where you used to see all Ruby or Python
- sodapopcan 4y agoI've actually been having a tough time finding another job in Elixir. Sooooo many companies who use it are in crypto and I just have no interest.
- freedomben 4y agoPurely my opinion after learning and professionally doing both Ruby and Python. If elegance and consistency in APIs matter, Ruby is by far the preference. Generally speaking (again from my own experience which should be taken with a grain of salt) the Ruby community tends to value readability/maintainability of code a lot higher, so working in the codebases is typically a lot more pleasant. IIWM I'd go with Ruby hands down.
- noyoudumbdolt 4y agoPHP had the benefit of Facebook pouring money into it. Same with JS and Google. No company has done something comparable for Ruby.
- weaksauce 4y agoshopify is putting up a lot of money and resources into ruby.
- theredfury 4y agohttps://shopify.engineering/shopify-ruby-at-scale-research-investment https://shopify.engineering/shopify-ruby-at-scale-research-i...
- Doctor_Fegg 4y agoYJIT, Ruby's new JIT compiler, is from Shopify.
- alberth 4y agoLet’s not forget that GitHub is a giant Rails app that Microsoft runs. Microsoft is also one of the best language/compiler company in the world.
- chucke 4y agoMicrosoft didn't start pouring bucks into improving ruby yet. Their focus has recently been on JS, C# and python.
- theappsecguy 4y agoReally wish Microsoft would contribute/donate to ruby/rails platform even more than Github does already. They can afford to.
- deleted 4y ago[deleted]
- 4y ago
- nickjj 4y ago> Seems like most of the Ruby gains are related to memory usage. That would be a welcome addition, especially with Rails where you typically end up running your web app, background worker and action cable as separate processes. That's (3) running services each booting up your application to some degree. Combine that with most apps using very little CPU and more and more memory, it's nice to be able to reduce memory when you can to optimize the machines you host things on. It always feels dirty having a server using 60% memory and 5% CPU.
- tmountain 4y agoPure speculation—Ruby has a deeper OOP story (everything is an object), and that comes with a builtin performance impact. I also feel like performance was never a top priority with the language (ergonomics instead), so certain aspects of the core design may not lend themselves to optimization as easily.