This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]