Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3218: string_algo algorithms are quite slow in some popular compiler/OS/hardware situations
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-07-20 19:17:46
#3218: string_algo algorithms are quite slow in some popular compiler/OS/hardware
situations
------------------------------------------------------+---------------------
Reporter: Yuri Goldfeld <yuri_goldfeld@â¦> | Owner: pavol_droba
Type: Bugs | Status: new
Milestone: To Be Determined | Component: string_algo
Version: Boost 1.37.0 | Severity: Problem
Keywords: performance string_algo strings |
------------------------------------------------------+---------------------
Comment(by anonymous):
Replying to [comment:6 steven_watanabe]:
> I just ran a few tests using a custom case insensitive comparison
predicate.
>
> {{{
> struct iequal_pred {
> bool operator()(char c1, char c2) const {
> return(std::tolower(c1) == std::tolower(c2));
> }
> };
> }}}
>
> The results look a lot better.
>
> {{{
> StartsWithI(string("abcdefghi"), "aBcD")| 349 msec.
> starts_with(string("abcdefghi"), "aBcD", iequal_pred())| 706 msec.
> Boost/hand ratio = 2.02292
>
> EqualsI("abcdefghi", "aBcDeFgHi")| 188 msec.
> equals("abcdefghi", "aBcDeFgHi", iequal_pred())| 262 msec.
> Boost/hand ratio = 1.39362
> }}}
Hello, thanks for the testing. It seems that MS locates implementation is
realy the cause of problems. In your test, you have used C-locales which
are probably much faster
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3218#comment:8> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC