fopen ifstream -- OK, what's the deal !?
So ya the c++ implementation of reading files is nice, but come on, what's better ?
fopen : 12.9 seconds to copy 10 megs
OR
ifstream : 17.3 seconds to copy 10 megs?
It's a tough one, but when making a game that requires constant loading of textures and data, what would be better ?
I have yet to learn the fopen library well, but so far it seems awesome.
Does anyone know of a faster method ?
Thanks in advance
For something as simple as copying data, I'd be surprised if there was that much difference between the two libraries. Are you comparing fread/fwrite with istream::read/ostream::write? What buffer size are you using?
Of course, whatever result you get depends on your compiler's library implementation. When the C++ iostreams library first came about, many were just built on top of the old C library, but they're *apparently* are a lot better now.
Of course, whatever result you get depends on your compiler's library implementation. When the C++ iostreams library first came about, many were just built on top of the old C library, but they're *apparently* are a lot better now.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement