Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
STL binary search
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Ivan Vecerina, post: 1513481"] I remember from personal experiments that searching a sorted vector is typically faster than using any of these containers. This was also reported by Scott Meyers and others (Andrei) IIRC. The associative containers only make sense if the list changes often. Of course, a hash table will work best, and while non-standard, hash_set is available in some form on most platforms. [if the list of words is known at compile-time, a tool like GNU gperf is an ultimate solution] Regards, Ivan [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
STL binary search
Top