4 ms·
Possibly if you mmapped all of the files and then used madvise() or something to prefetch in front of where you are. Maybe grep does that, I don't know? It doe
by DarkShikari 16y ago
Possibly if you mmapped all of the files and then used madvise() or something to prefetch in front of where you are. Maybe grep does that, I don't know?
It doesn't do that, and that's the first method I used in my hack.
fadvise() works just as well though, I think.
- angusgr 16y agoIt doesn't do that, and that's the first method I used in my hack. Fair enough. :) If you feel like sharing then I'm very curious as to what the additional methods were.
- DarkShikari 16y agoIt was a total hack, so I just opened files ahead of time, fadvised them, then closed them.