1

I am hearing by lots of programmer that Ruby lacks in performance with comparison to php. So i try to find out the real picture behind that i saw this post Why do people say that Ruby is slow? .

There are many articles I found but most of them are too old to be considered for me in current scenario as ruby 2.1 already revealed. As a Ruby on rails developer I loved it. But want to know is this true and if yes how can we overcome this bottleneck in ruby .

So please put your thoughts on that

Community
  • 1
  • 1
Nitin Jain
  • 3,053
  • 2
  • 24
  • 36
  • Could you give a concrete scenario (e.g. typical data sources and model for a page) where you want to make a comparison between Ruby and PHP-based benchmarks? Performance of the language may not be an issue - for many site designs, you are most likely to have data I/O issues. Performance and availability of easy-to-use libraries are also a factor. – Neil Slater Feb 27 '14 at 10:12
  • NO i do not have a scenario but would like to know does ruby has such type of bottleneck – Nitin Jain Feb 27 '14 at 11:03
  • Bottlenecks in this case are going to specific to *what you are doing*. Even just comparing raw language stats (which would be false otpimisation), some things are faster in Ruby than PHP, and vice-versa. In general my *guess* is that Ruby often comes out as slower, but with less code to maintain. Just an opinion: The differences in speed are small compared to differences between database logic, so you should not base language choice from worrying about this. – Neil Slater Feb 27 '14 at 11:36
  • @NeilSlater yeah thats what i thought . that is a good clarification – Nitin Jain Feb 27 '14 at 14:48

1 Answers1

5

I think how you design your code and what software architecture you use has a larger impact on your performance than the underlying language. In my opinion programmers and software architects make software fast or slow. Ruby and PHP are both interpreted languages which can make code slower than compiled code because a compiler does certain optimizations. But for both PHP and Ruby there exist bytcode caches and compilers.

Martin Fahl
  • 937
  • 2
  • 12
  • 28