This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A sick idea - mmapped file output


Linus Torvalds <torvalds@transmeta.com> writes:
>
>Comparing the mmap() with a stdio-based approach is unfair.  You should
>at least try with direct write() calls.  If the common case is _really_
>short writes, you could go half-way, with a really simple buffering
>scheme rather than stdio (expose the buffer or similar).

My experiments reading/wring huge netlist files for work showed best 
performance was mmap() for reading and write() of "large" chunks 
for writing.  

-- 
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]