From: Jeff Pritchard Date: 2006-07-15T00:24:38+09:00 Subject: Re: How to speed up ruby and make it as fast as possible Peter, I found your last paragraph intresting. Can you give us some ballpark comparisons between a profiled/selectively C extensionized app and a completely re-written one? I would think it would be almost as effective to render all of the significant bottlenecks in C and leave the rest in ruby. Have you seen significant speed improvements by taking this last step of replacing the whole thing with C? thanks, jp Peter Hickman wrote: > Profile your code, see where the bottlenecks are and refine the > algorithms. There are no real tricks, it all comes down to good coding > that is aware of how the language is best used and how your application > is structured to handle the commonest usage. > > If this is a critical production thing then buy better hardware, it is > invariably cheaper in the long term than trying to squeeze a few > percentage points out of your code. > > I also rewrite all my performance critical code in C, that is the whole > application gets rewritten in C once I have used Ruby to prototype the > code. -- Posted via http://www.ruby-forum.com/.