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]

Re: feb-2002 libstdc++ outstanding


Benjamin Kosnik wrote:
> 2002-02-21 Random Access Iterator into FileStream Buffer
>         http://gcc.gnu.org/ml/libstdc++/2002-02/msg00247.html
>         http://gcc.gnu.org/ml/libstdc++/2002-02/msg00248.html
>         any working examples?

after I some private discussion with John Maddock it seems to me he
probably wil remove it from boost's regex (actually that is not the
best place for it). so would be useful to add it somewhere else.
on the other hand (although that code is not so clear as other part
of regex) that mapfile are very generic. it can compile both on
windows and linux with many different compiler which is a pro.
IMHO it's not so trivial to write a Random Access Iterator for files
which are efficient. the memory mapped file is one of the best choise.
so adding a memory mapped file to the extension part of stdc++ can
be a good choise. however write a Random Access Iterator on top of 
the c++ stream library is not a good choise since it won't be efficient. 
may be other stream expert's have other opinions.

ps. IMHO efficiency is a real hard requirement. in almost our project
where we reach a point when we have to optimize the code, the first 
thing is always to remove all c++ stream handling. ok in most case
it's on windows with msvc's stream library which is an order slower 
than gcc's stdc++ stream library, but it's still faster to use C
io library on linux too.

-- 
  Levente                               "Si vis pacem para bellum!"


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