This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Random Access to File problem
- From: Stephan Buys <s dot buys at icon dot co dot za>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 25 Feb 2002 21:28:38 +0200
- Subject: Random Access to File problem
Hi all,
I posted a question earlier this week regarding a Random Access Iterator for
a filebuffer.
My question now is: What is the efficiency/penalties of just using seek() a
lot?
What I did is created operator[] for my ifstream and all it does is seek()
end return get(). Is this terrible or sufficient? Theorectically seek() could
perform well if it was well aware of the internal buffering.
Any ideas? Insights? I have no ideas on how the internal bufferring looks.
Regards,
Stephan Buys