On Tue, 24 Jun 2008 11:30:45 -0700, The Ghost In The Machine
<ewill@[EMAIL PROTECTED]
> wrote, quoted or indirectly quoted
someone who said :
>I can do one better, though I rarely bother (I've seen
>it done by a co-worker though); one can set up a virtual
>memory area that is associated with a file, and then access
>the area using char* pointers. The file load in this case
>is done on an incremental basis, with pages faulting in as
>needed. (mmap()/mmap2(), mremap(), munmap().)
that would do well if you were processing only part of the file, but
if you were processing every byte, then one giant i/o to read the whol
thing would do better. Otherwise you could get a physical I/O per 2K
or so, not even as good as a BufferedReader.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


|