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.
Hello Paul
Do you mean by undef $/ and with <$fh> we can read the file into memory
at one time?
Yes that would be faster b/c we don't need to read file by each line,
which increases the disk IO.
Another questions:
1. what's the "truss" command?
2. what's the syntax "<:mmap"?
Thank you.
O