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-18 16:48:42
#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 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
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3218#comment:6> 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