From: Francis Cianfrocca Date: 2006-07-27T04:59:13+09:00 Subject: Re: For performance, write it in C Ashley Moran wrote: > performance lately. I just had to write a script to process about > 1-1.5GB of CSV data (No major calculations, but it involves about 20 > million rows, or something in that region). I've had tremendous results optimizing Ruby programs that process huge piles of text. There is a range of "tricks" you can use to keep Ruby from wasting memory, which is its real downfall. If it's possible, given your application, to process your CSV text in such a way that you don't store any transformations of the whole set in memory at once, you'll go orders of magnitude faster. You can even try to break your computation up into multiple stages, and stream the intermediate results out to temporary files. As ugly as that sounds, it will be far faster. In regard to the whole conversation on this thread: at the end of the day, absolute performance only matters if you can put a dollar amount on it. That makes the uncontexted language comparisons essentially meaningless. In regard to YARV: I get a creepy feeling about anything that is considered by most of the world to be the prospective answer to all their problems. And as a former language designer, I have some reasons to believe that a VM will not be Ruby's performance panacea. -- Posted via http://www.ruby-forum.com/.