cullmann created this revision. cullmann added reviewers: vkrause, dhaumann. Herald added projects: Kate, Frameworks. Herald added subscribers: kde-frameworks-devel, kwrite-devel. cullmann requested review of this revision.
TEST PLAN make && make test before, perf tells for perf record -g ./bin/htmlhighlighter_test > Rule::match 40% & KeywordListRule::doMatch 26% ================================================ after the patch > Rule::match 17% & KeywordListRule::doMatch 4.5% ================================================= binary search was slower, contains is much faster on the VERY small strings REPOSITORY R216 Syntax Highlighting BRANCH master REVISION DETAIL https://phabricator.kde.org/D15129 AFFECTED FILES src/lib/rule.cpp src/lib/rule_p.h To: cullmann, vkrause, dhaumann Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann