From 85dd43cb420a7be3cd5ec2520f55685327978af0 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 2 Dec 2022 09:48:42 +1100 Subject: Detangle ASCII and multi-byte code for case-insenstive UTF-8 searches. This avoids some work for the common case of ASCII text, which can reduce time taken for search in text that is ASCII or almost-all ASCII by 30%. Ensures that the bytes variable is always initialized. There are a small gains possible by making other minor changes but they would increase code length and add complexity. Add performance test for UTF-8 search in almost-all ASCII document. Increase size of test cases for more consistent results on faster computers. --- cppcheck.suppress | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cppcheck.suppress') diff --git a/cppcheck.suppress b/cppcheck.suppress index 2515e8978..2d767ee2f 100644 --- a/cppcheck.suppress +++ b/cppcheck.suppress @@ -13,6 +13,10 @@ useStlAlgorithm // Written with variable for consistency knownArgument:scintilla/src/SparseVector.h +// The cast converts from 'unsigned char ' to 'char' so isn't unused. +// Redundant code: Found unused cast of expression 'leadByte' +constStatement:scintilla/src/Document.cxx + // Some non-explicit constructors are used for conversions or are private to lexers noExplicitConstructor -- cgit v1.2.3