SFML community forums

Help => General => Topic started by: tom64 on March 29, 2013, 02:31:26 pm

Title: (C++ question) What's the fastest way to load from HDD to RAM?
Post by: tom64 on March 29, 2013, 02:31:26 pm
Is it good practice (maximum efficient) to load data from a HDD file using the standard file loading function and a for loop? Or is there a faster way to load (especially if you're going to be loading large chunks of data in sequence from the HDD)?
Title: AW: Re: (C++ question) What's the fastest way to load from HDD to RAM?
Post by: eXpl0it3r on March 29, 2013, 02:51:05 pm
standard file loading function and a for loop?
What do you mean by that?
The way to go with C++ is a fstream.

But depending on what the data is used for you might want to jump through the file instead of loading every byte into memoy.

Questions like, what is the best way to do X, are mostly bad questions, since it always depends on what you're doing, how large the data is, what PC specs you're developing for etc. -> provide more info :)