Re: Benchmark for Scala, Ruby and Perl

2022-01-17 Thread Paul Procacci
Hey John, One more follow up and then it's bedtime for me. I wanted to further this discussion just a little bit more by implementing the mmap solution that I applied to perl to ruby instead. Now all of a sudden, ruby is much much faster. My ruby source code follows: Goodnight! # ruby -W0

Re: Benchmark for Scala, Ruby and Perl

2022-01-17 Thread Paul Procacci
Hey Jon, The most glaringly obvious thing I could recommend is that at least in your perl routine (and probably the other languages) most of your time is context switching reading from the disk. Now, my perl version is indeed faster, but one has to ask themselves, was .015193256 seconds really

Re: Benchmark for Scala, Ruby and Perl

2022-01-17 Thread Paul Procacci
Hey John, On Sat, Jan 15, 2022 at 3:04 AM Jon Smart wrote: > > Hello Paul > > Do you mean by undef $/ and with <$fh> we can read the file into memory > at one time? > In most cases the short answer is yes. I have problems with your wording however given the 'geek' that I am. 'At one time'

Re: Benchmark for Scala, Ruby and Perl

2022-01-17 Thread Paul Procacci
Sorry, it's 5:00am here and needless to say it's wy past my bedtime and I'm making mistakes. The comparison should have been between both ruby versions ugh. I'll let you play though. Have a great night. On Sat, Jan 15, 2022 at 4:57 AM Paul Procacci wrote: > Hey John, > > One more

Re: Benchmark for Scala, Ruby and Perl

2022-01-17 Thread Paul Procacci
On Sat, Jan 15, 2022 at 5:03 AM Jon Smart wrote: > > Thanks Paul. I am surprised that mmap has that huge IO advantages > comparing to the classic way. So ruby take more benefit from this mmap > calling. Just get learned from your case. > > Regards > > It's not always beneficial. There are cases