From: Brian Candler Date: 2003-04-11T17:32:17+09:00 Subject: Re: Need IO Optimization help On Fri, Apr 11, 2003 at 03:10:27AM +0900, Jim Freeze wrote: > Below are the results I get from your benchmarks. I added > the last test which seems to be the fastest, AND is what > I was doing in my tests. To bad perl is 50% faster. > > Can this be spead up with a C routine? I did some profiling of a very similar program, results posted at http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb?key=-pg&cginame=namazu.rb&submit=Search&dbname=ruby-talk&max=50&whence=0 Conclusion: I can see no obvious bottlenecks. When you drill down and work out how much time is spent in object creation and garbage collection, file reading and scanning etc. it seems all pretty well balanced to me. The reading and breaking-into-individual-lines accounts for 1.09 seconds out of 2.53 seconds Regards, Brian.