Ruby on Rails
Posted On Sunday, September 13, 2009 at at 12:52 AM by LokeshRecently I was working on a XML feed generation task in a RoR project. I did a cursory performance analysis recording file size against time. The interesting thing was the time taken to generate file increased exponentially with increasing file size. So I decided to compare ruby's performance against Lava, C, C++, Scala and Javascript. I have tabulated the results of the benchmark tests from http://shootout.alioth.debian.org.
The results were surprising though hardly any N Body solutions would be implemented with Ruby in reality (included just for visualising performance @ heavy computation load).
I realized that RoR is ideal for projects that don't have computation heavy / memory intensive operations in backend. Or even, we can build such backend systems in other languages that are cpu & memory efficient and have frontend built with RoR. We shouldn't be expecting RoR to do that.
I am not undermining RoR but I think we should contemplate on nature of the system that we will be building.
I realized that RoR is ideal for projects that don't have computation heavy / memory intensive operations in backend. Or even, we can build such backend systems in other languages that are cpu & memory efficient and have frontend built with RoR. We shouldn't be expecting RoR to do that.
I am not undermining RoR but I think we should contemplate on nature of the system that we will be building.
> The results were surprising ...
Say why you thought the results were surprising.
Say why you selected those 3 tasks out of the 13 tasks (thread-ring is about little more than the time to task switch).
1. I thought the results wouldn't be showing such variance.
2. Yes. Thread ring involves not just switching but sharing tokens. I am pretty new to Ruby (but I have 8+ years of development experience). This is definitely not a ruby expert's analysis :) I was bit curious why few rails web servers are single threaded. So I planned to compare thread switch / token sharing as well(I might be wrong choosing Thread Ring). I was interested in three basic areas: cpu intensive computations, memory management and threading.
I am neither embracing nor undermining RoR.
I didn't publish the code and time / mem details of my personal experiment as it wouldn't have been a fair benchmark to compare. Only after witnessing personal experiment result I went for searching standard benchmark tests