std.file or stream

Daniel Keep daniel.keep.lists at gmail.com
Fri Nov 23 18:03:30 PST 2007



Christopher Wright wrote:
> Kar wrote:
>> Im trying to index a very large document collections. I need to know
>> which file access method is faster, either std.file read all data into
>> buffer or use stream.
>>
>> i didnt understand stream very well, does it store file strings in
>> memory or just a pointer to exact disc location.
>>
>> The index file could be more than 10GBs, so which method is better.
> 
> std.mmfile for the win.
> 
> Try the higher-level interface in std.stream.MmFileStream.

I haven't used memory-mapping before, so excuse my ignorance, but how
would you map a 10GB file into the address space on a 32-bit machine?!

	-- Daniel



More information about the Digitalmars-d mailing list