Jump to content
  • Advertisement

Archived

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

Tyrian

So which would be better for a game project...

This topic is 6309 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Buffered File I/O or unbuffered File I/O. In terms of speed and efficiency? (Using the two types of C++ file I/O)

Share this post


Link to post
Share on other sites
Advertisement
Well, it generally doesn''t matter, because you generally won''t be reading/writing files in real time except in cases of streaming of audio/video (which is a special case) or writing a log file.

If you''re writing a log file, then it''s preferable to use unbuffered, because if you use buffered and your program crashes before the file is closed then the file won''t be written and you''ll have no log. With unbuffered, no matter if the program crashes or the file is closed correctly, you''ll still have a readable file.

Hope this helped.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!