Archived

This topic is now archived and is closed to further replies.

frankd

file read/write buffer sizes

Recommended Posts

I recently made a program that packs/unpacks files. I used a loop, copying 1mb at a time until done. Now I know that if I had copied 1 byte at a time it''d be really slow, but at what point does a bigger buffer not cause any speed improvements? I mean if I read 100mb into a buffer (assuming there''s the ram) the hard drive couldn''t do that in 1 go like a smaller chunk. It''d be useful to know cos I don''t want to waste ram with a huge buffer (even if it is temporary) that doesn''t help speed, but I don''t want to restrict the speed with a buffer that''s too small. Hope I''m making sense, thanks

Share this post


Link to post
Share on other sites