Brian Candler wrote: > > On Mon, Apr 07, 2003 at 09:21:04PM +0900, ts wrote: > > See [ruby-talk:68578] > > > > ruby168 BIG = 319 > > ruby168 SMALL = 95 > > > > ruby18p2 BIG = 12 > > ruby18p2 SMALL = 12 > > Oh I'm not arguing that ruby 1.8p2 isn't better than ruby 1.6.8. I believe > that those tests were done under Windows, and that just shows how dreadful > Windows I/O libraries are. > > Under FreeBSD I see almost zero difference between ruby 1.6.8 and ruby 1.8p2 > for the attached program, showing that a real operating system comes with > decent I/O libraries. > > Perl is still nearly twice as fast as ruby though: > > [brian@vaio ruby]$ time ruby x.rb /usr/share/dict/words > Elapsed = 2.146236062 > > real 0m2.492s > user 0m2.362s > sys 0m0.120s > [brian@vaio ruby]$ time perl x.pl /usr/share/dict/words > Elapsed = 1 > > real 0m1.347s > user 0m1.251s > sys 0m0.080s > > However evil or optimised perl's I/O libraries are, I doubt that that's the > reason for the difference. > > Regards, > > Brian. Does running your code through the profiler provide any insight? Any chance you could post the Perl and Ruby profiler results side by side? perl -MDevel::Profiler x.pl # assuming you have Devel::Profiler ruby -rprofile x.rb Regards, Dan