From: MiG Date: 2005-03-11T16:54:34+09:00 Subject: Re: very slow IO (STDIN.gets and puts) on Linux, ruby 1.8.2_pre3 1. I have NOTHING against Ruby, it is my best language 2. Is it wrong-doing to ask? 3. My dumb benchmark: I used real data. If you have 2GB of free RAM and use 80MB file, is it wrong? It's the same if you have 1MB RAM and use smaller file. I used the real data I have, that's all. It behaves the same way with smaller. 4. Thank you for excellent humour. MiG >English is so much worse than Japanese! When I try to count to one >million in English it takes me 3.42 days, but when I try it in Japanese, >it only takes me 3.12 days! > >Obviously, that means English is the worse language. Why does English >suck so bad?!? > >----- > >In other words: your benchmark is really dumb. That isn't practical >code, and trying to draw any conclusions from it is silly. For Ruby to >be considered fast, how much time should it take to read and discard a >line of text 5 kagillion times? Btw, I found a way to optimize your code: > >deleteme.rb >#!/usr/bin/ruby >exit(0) > >ben% time ruby deleteme.rb >ruby deleteme.rb 0.00s user 0.00s system 102% cpu 0.006 total > >I'm still working on getting it to run in less than 0.004 total. > >Ben >