in reply to Re^2: How smart is 'seek $fh, $pos, 0'?
in thread How smart is 'seek $fh, $pos, 0'?
Update: Interestingly, I'm getting 7, 8, 6, 12 with 1GB file, too.
Still probably too small to prevent the entire file being cached. (Unless you have less that about 2GB ram?)
Even so, I can't reason an explanation for why seek backwards relative would be faster than forwards.
If you have the ability to run that utility that traces system calls (strace?), that might reveal something.
|
|---|