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 ./d
lt; 20) {
print "$_ -> $count{$_}\n"
} else {
last;
}
$i ++;
}
On Sat, Jan 15, 2022 at 12:37 AM Jon Smart wrote:
> Hello,
>
> May I show the result of my benchmark for perl5, ruby, and scala?
> https://blog.cloudcache.net/benchmark-for-scala-ruby-and-perl/
>
> Welcome you to give any suggestion to me for improving this.
>
> Thanks.
>
--
__
:(){ :|:& };:
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'
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 foll
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
On 1/15/22 06:37, Jon Smart wrote:
Hello,
May I show the result of my benchmark for perl5, ruby, and scala?
https://blog.cloudcache.net/benchmark-for-scala-ruby-and-perl/
Welcome you to give any suggestion to me for improving this.
Thanks.
The data is way to small tbh, there is no
Thanks for the geeks on the lists who pointed out a lot of problems to
me.
I want to add the description why I want to make this benchmark. And I
tried to use mmap() for reading file but I have got no benefits from it.
https://blog.cloudcache.net/why-mmap-has-no-significant-effect-in-my-code/
On 2022-01-15 00:04, Jon Smart wrote:
Hello Paul
Do you mean by undef $/ and with <$fh> we can read the file into memory
at one time?
$/ is the input record separator, newline by default.
If undefined that means that the whole file is treated as one single record.
Yes that would be faster
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
On 15.01.2022 17:57, Paul Procacci wrote:
Hey John,
One more follow up and then it's bedtime for me.
fh>;
%res;
};
my $i=0;
for (sort {$count{$b} <=> $count{$a}} keys %count) {
if ($i < 20) {
print "$_ -> $count{$_}\n"
} else {
last;
}
$i ++;
}
On Sat, Jan 15, 2022 at 12:37 AM Jon Smart wrote:
Hello,
May I show the result of my
Hello,
May I show the result of my benchmark for perl5, ruby, and scala?
https://blog.cloudcache.net/benchmark-for-scala-ruby-and-perl/
Welcome you to give any suggestion to me for improving this.
Thanks.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e
11 matches
Mail list logo