Qt Base (Core, Gui, Widgets, Network, ...)
Go to file
Thiago Macieira b347d48704 QString/QByteArray: further inline the most common indexOf operations
In the case of QString, the vast majority of searches are case-
sensitive, so by inlining we make the user code call qustrchr() directly
instead of QtPrivate::findString(). In the case of QByteArray, the call
is to memchr(), which being a compiler intrinsic, may itself be inlined
or even just resolved at compile time.

In both cases, a great deal of searches use from=0.

Benchmark for QByteArray; before:
     8.83207052 nsecs per iteration
     22.01568546 CPU cycles per iteration, 2.49 GHz
     60.00000331 instructions per iteration, 2.725 instr/cycle
     21.00000281 branch instructions per iteration, 2.38 G/sec

After:
     6.42561493 nsecs per iteration
     16.01623130 CPU cycles per iteration, 2.49 GHz
     49.00000261 instructions per iteration, 3.059 instr/cycle
     18.00000211 branch instructions per iteration, 2.8 G/sec

This shaves 6 cycles in the execution and 11 instructions (3 of which
were branches), slightly improving the IPC raito, for the QByteArray
case. For QByteArrayView, there are 2 fewer instructions (1 a branch),
but the number of cycles is the same at 16.

Task-number: QTBUG-119750
Change-Id: Ica7a43f6147b49c187ccfffd179e2204ebb6a348
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-12-21 11:13:32 -08:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
LICENSES Clarify license of SHA-1 algorithm 2023-04-26 16:36:18 +02:00
bin CMake: Don't strip debug builds with qt-cmake-private-install in CI 2023-11-03 18:24:46 +02:00
cmake CMake: don't set TIMEOUT_SIGNAL_NAME for Android target on Windows host 2023-12-20 17:55:02 +02:00
coin Coin: Add native MSVC ARM64 instructions 2023-12-18 20:00:44 +02:00
config.tests Remove the mandatory x86-64 features from its feature list 2023-05-31 14:55:37 -07:00
dist
doc Doc: Give offline-dark.css ".qmlextra" a visible text color 2023-12-21 17:38:01 +00:00
examples Update visuals of remote controlled car example 2023-12-21 19:49:28 +01:00
lib
libexec CMake: Add a config.redo script similar to qt5's config.status 2023-09-20 21:20:13 +02:00
mkspecs wasm: set MAXIMUM_MEMORY to 4GB 2023-12-20 00:44:28 +00:00
qmake Remove build machine path that was baked into the qmake binary 2023-12-13 06:56:48 +00:00
src QString/QByteArray: further inline the most common indexOf operations 2023-12-21 11:13:32 -08:00
tests QWindowContainer: Don't embed a QWidget 2023-12-21 18:49:29 +00:00
util Bump version to 6.8.0 2023-12-11 17:35:40 +02:00
.cmake.conf Bump version to 6.8.0 2023-12-11 17:35:40 +02:00
.gitattributes
.gitignore Git ignore Visual Studio CMake build directories 2023-11-24 23:42:05 +01:00
.lgtm.yml
.tag
CMakeLists.txt CMake: Fix find_package(Qt6*Tools) in non-qtbase tests 2023-08-23 16:21:58 +02:00
config_help.txt Update config_help.txt with -trace ctf 2023-12-09 12:05:24 +02:00
configure configure: Make sure the configure script exits with cmake's exit code 2023-11-22 05:34:28 +01:00
configure.bat CMake: Add a config.redo script similar to qt5's config.status 2023-09-20 21:20:13 +02:00
configure.cmake Add qtbase modules to ./configure -list-features 2023-12-21 14:13:01 +01:00
dependencies.yaml
qt_cmdline.cmake Add coverage and coverage-gcov features 2023-09-22 15:54:30 +02:00