From: Vidar Hokstad Date: 2006-11-27T08:45:05+09:00 Subject: Re: Two Advanced Ruby Performance Questions Edwin Fine wrote: > Given an algorithm in Ruby, and the same algorithm in C, the algorithm > will perform better in C if the Ruby code consists mostly of primitives > (e.g. a += 1, loops with many iterations, conditionals, object creation > and destruction, and so on). If the Ruby code is really just calling > high-level underlying C library code, then there will not be that much > difference. True, but the original poster indicated he's looking at a database backed web application. In that kind of environment, in all likelihood most of the execution time will be dictated by database speed and network performance. Of course you can easily kill performance for those kind of apps by doing the wrong things too, but the odds that he'll need to resort to C to get the performance he needs for something like that are minimal, and in any case with the ease of writing C extensions for Ruby it would be a severe case of premature optimization. The original poster is looking in the right direction by looking for options that minimize the per request overhead (i.e. avoiding parsing the source and creating the object hierarchy per request). FastCGI for instance would be a good starting point. Vidar