Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



It 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.


It was a total hack, so I just opened files ahead of time, fadvised them, then closed them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: