:of me. Unfortunetly he has not posted this version yet so I cannot
:download it and run it myself. He also says that if mmap fails, he drops
:back to stdio. This should only happen in the NFS case, the > 2G case,
:etc.
It should only be the > 2G case or the pipe case. mmap() works just fine
over NFS.
I would not expect a huge speed increase using mmap over read. mmap()
tends to be a lot harder on the system then read() (though we are working
on that), especially if you are scanning large files.
Avoiding buffer copies is good, but keep in mind that the cost of accessing
a location in memory is essentially 0 if the memory is already in the L1
cache. So while you may get an improvement going from read() to mmap(),
which avoids large buffer copies, you will not see much of an improvement
removing redundancy from the line scan.
-Matt
Matthew Dillon
<[EMAIL PROTECTED]>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message