Jump to content
  • Advertisement


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


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

This topic is 6484 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
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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!