summaryrefslogtreecommitdiffstats
path: root/src/corelib/configure.json
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2021-04-30 13:24:19 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2021-06-11 23:30:08 +0200
commitb24e689cb561d81745ff47a5ce4595b809923914 (patch)
treecd1880b963222bffd350204ec62bee5bd39da511 /src/corelib/configure.json
parentde2c3ccd49cb89e0c6912da3b03705a36ef03946 (diff)
QLatin1String: optimize indexOf
Some time ago I wanted to use QStringTokenizer with a QL1S haystack and needle to optimize a particular bottleneck. Only to realize the new bottleneck was more expensive (continuously converting both the strings to QString). Change-Id: Ica86db0043c839c2336a3c3886ffbe3875659b5b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/configure.json')
-rw-r--r--src/corelib/configure.json23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index 4643531135..c68c0cf4bf 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -282,6 +282,22 @@
"main": "std::mt19937 mt(0);"
}
},
+ "cxx17_bm_searcher": {
+ "label": "C++17 boyer_moore_searcher",
+ "type": "compile",
+ "test": {
+ "include": [ "algorithm", "functional" ],
+ "main": [
+ "const char haystack[] = \"hello\";",
+ "const char needle[] = \"e\";",
+ "const auto it =",
+ "std::search(haystack + 0, haystack + std::size(haystack),",
+ "std::boyer_moore_searcher(needle + 0, needle + std::size(needle)));",
+ "(void)it;"
+ ],
+ "qmake": "CONFIG += c++17"
+ }
+ },
"cxx17_filesystem": {
"label": "C++17 <filesystem>",
"type": "compile",
@@ -543,6 +559,13 @@
"condition": "tests.cxx11_future",
"output": [ "publicFeature" ]
},
+ "cxx17_bm_searcher": {
+ "label": "C++17 boyer_moore_searcher",
+ "condition": "tests.cxx17_bm_searcher",
+ "output": [
+ "privateFeature"
+ ]
+ },
"cxx17_filesystem": {
"label": "C++17 <filesystem>",
"condition": "tests.cxx17_filesystem",