5 ms·
Rails can become a ball of mud as much as any other framework can. It's not the fastest language, but it's faster than a lot of dynamic languages. Other than t
by m00x 2y ago
Rails can become a ball of mud as much as any other framework can.
It's not the fastest language, but it's faster than a lot of dynamic languages. Other than the lack of native types, you can manage pretty large rails apps easily. Chime, Stripe, and Shopify all use RoR and they all have very complex, high-scale financial systems.
The strength of your tool is limited to the person who uses the tool.
- amomchilov 2y agoThe unrefactorable ball of mud problem is real, which is why both Stripe and Shopify have highly statically typed code bases (via Sorbet). Btw Stripe uses Ruby, but not Rails.
- fredrikholm 2y ago> It's not the fastest language, but it's faster than a lot of dynamic languages. Such as? IME Ruby consistently fall behind, often way behind, nearly all popular languages in "benchmark battles".
- Lio 2y agoPython? Ruby with YJIT, JRuby or Truffle Ruby usually beats python code in benchmarks. I haven’t seen a direct comparisons but I wouldn’t be surprised if Truffle Ruby was already faster than either elixir, erlang or php for single threaded CPU bound tasks too. Of course that’s still way behind other languages but it’s still surprisingly good.
- relistan 2y agoIn my work I’ve seen that TruffleRuby codebases merging Ruby and Java libraries can easily keep pace with Go in terms of requests per second. Of course, the JVM uses more memory to do it. I mostly write Go code these days but Ruby is not necessarily slow. And it’s delightful to code in.
- fredrikholm 2y ago> Python? Ruby with YJIT, JRuby or Truffle Ruby usually beats python code in benchmarks. Isn't that moving the goal post a lot? We wen't from 'faster than a lot of others' to 'competing for worst in class'. I'm not trying to be facetious, I'm curious as I often read "X is really fast" where X is a functional/OOP language that nearly always ends up being some combination of slow and with huge memory overhead. Even then, most Schemes (or Lisps in general) are faster. Being faster single threaded against runtimes that are built specifically for multithreaded, distributed workloads is also perhaps not a fair comparison, esp. when both runtimes are heavily used to write webservers. And again, Erlang (et al) come out faster even in those benchmarks. Is TruffleRuby production (eg. Rails) ready? If so, is it that much faster? I remember when the infamous "Truffle beats all Ruby implementations"-article came out that a lot of Rubyists were shooting it down, however this was several years ago by now.
- Lio 2y agoMoving the goal posts? Perhaps I misunderstand what you are asking. Python is the not the worst in class scripting language. For example perl and TCL are both slower than python. Originally you just asked, "such as" [which dynamic language ruby is faster than?] Implying ruby is slower than every other dynamic language, which is not the case. JRuby is faster than MRI Ruby for some Rails workloads and very much production ready. Truffle Ruby is said to be about 97% compatible with MRI on the rubyspec but IMHO isn't production ready for Rails yet. It does work well enough for many stand alone non-rails tasks though and could potentially be used for running Sidekiq jobs. The reason to mention the alternative ruby runtimes is to show that there's nothing about the language that means it can't improve in performance (within limits). Whilst it's true that ruby is slower than Common Lisp or Scheme, ruby is still improving and the gap is going to greatly reduce, which is good news for those of us that enjoy using it.
- taurknaut 2y ago> Rails can become a ball of mud as much as any other framework can. ...but rails can fit this dysfunction on a single slide ;)
- weaksauce 2y agoit's faster than python in some tests that i've seen.