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: search/search_n vs find/find_if


Paolo Carlini wrote:
Paolo Carlini wrote:

Can you see anything wrong with calling find_if, instead? Actually, first blush, I don't understand why find_if was not exploited also in the original HP/SGI code...


In order to implement this, bind2nd is needed, apparently, but I cannot see anything wrong...


This is actually very slightly harder than I thought at first... as find is optimised for char types.. therefore it might be necessary to catch if find_if is being given our special comparison object and if so pass it back to find.. however I'm going to investigate to see a) how much speed benefit is actually given by the char specialisations of find and b) how messy it looks delegating find_if to find :)


Chris


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