Plus if it is performant enough for Shopify and Github it seems like it would be performant for 90%+ of use cases? The speed of development and the flexibility of development is much greater than most stacks once you add rails.
Plus if it is performant enough for Shopify and Github it seems like it would be performant for 90%+ of use cases? The speed of development and the flexibility of development is much greater than most stacks once you add rails.
That said, the difference isn’t enough to matter. Both languages are in the same performance magnitude and thus suited for the same kind of tasks.
Ruby
IO.foreach('logs1.txt') {|x| puts x if /\b\w{15}\b/.match? x }
Python with open('logs1.txt', 'r') as fh:
for line in fh:
if re.search(r'\b\w{15}\b', line): print(line, end='')
Ruby's best was 3.3 seconds whilst Python's was 3.9 seconds. If you factor-out Ruby taking 100ms longer than Python to startup Ruby is 18% faster than Python for string parsing. Results probably differ for Python's numeric performance but that depends whether you're including C-based third party libs such as numpy.But then you have JIT based ones as well, TruffleRuby, RubyMotion, Rubinius.
It's very misleading for large companies to say "Ruby on Rails is performant enough", as they rely on other languages for their performance critical workflows.
I remember sometime ago on HN a GitLab developer repeating the same sentence. Actually, GitLab does use Golang for some microservices.
It's wonderful that a combination of Ruby and <performant_language> is easy to develop/maintain and fast at the same time, however, the distinction with a pure Ruby system is not a trivial semantic matter, as it perpetuates the wrong and misleading idea that pure Ruby is fast enough to develop a complex system.
https://www.slideshare.net/RedisLabs/redisday-london-2018-ho...
Even more of the article has to do with Rails, and not ruby in general.
But the larger point, are you suggesting that in a language that is "performant enough", developers need no performance advice, they can write however they want and get adequate performance, for any performance needs?
Maybe, although I'm dubious. The existence of advice for programming does not mean a language/platform isn't "something enough" until we have AI writing code. At any rate, if such a language exists it is not ruby. But I disagree with that suggestion. The existence of optimization advice does not mean that a language "is not performant enough". If Shoppify is still happily using ruby/rails, I would say it indeed demonstrates they are performant enough for them.
Also describing common performance pitfalls does not imply that something is or isn’t “performant enough”. Only that you can make mistakes that will affect performance.
That, I’m afraid, is true for every language or framework.