Re: Benchmark for Scala, Ruby and Perl

2022-01-17 Thread Paul Procacci
ke(20).each do |s| puts "#{s[0]} -> #{s[1]}" end On Sat, Jan 15, 2022 at 3:48 AM Paul Procacci wrote: > 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

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 wor

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: >

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