Random Access to File problem

Stephan Buys s.buys@icon.co.za
Mon Feb 25 13:06:00 GMT 2002


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



More information about the Libstdc++ mailing list