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: on the speed of std::string::find


Jari Sundell wrote:

After reading the man page, especially its reference to needles and
haystacks, I was expecting it to use an algorithm similar to
Boyer-Moore. Is there's any specifc reasons for it not doing this?

I seem to remember that some of these issues have been discussed already when a new implementation of search_n has been contributed... Certainly there are many factors to consider, whether tables are wanted or not, startup costs... Honestly, I'm not sure we want to start from scratch with string matching: there are entire PhDs devoted to it ;) I would suggest first clearing a bit what we have, what we had, how we are really doing on many different cases, always taking into account the effect of the optimizers (the compiler is quickly evolving in its treatment of the string functions/builtins).


Paolo.


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