qt6-bb10/src
Milian Wolff de5b83ac86 Optimize QTimeZone::utc()
Instead of using the QTimeZone ctor taking a string representing
UTC which then first needs to be parsed, use the offset-from-UTC
ctor with an offset of 0.

This approach is much faster, compare the following results for
the tst_QTimeZone::utc benchmark as built on my machine with:

    Config: Using QtTest library 6.10.0, Qt 6.10.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 14.2.1 20250207), arch unknown

Before:

    358.686871 nsecs per iteration (total: 358,686,513, iterations: 999999)
    896.524312 CPU cycles per iteration, 2,5 GHz (total: 896,523,416, iterations: 999999)
    2,227.000427 instructions per iteration, 2,484 instr/cycle (total: 2,226,998,200, iterations: 999999)
    560.000375 branch instructions per iteration, 1,56 G/sec (total: 559,999,815, iterations: 999999)

After:

    102.004937 nsecs per iteration (total: 102,004,835, iterations: 999999)
    452.836869 CPU cycles per iteration, 4,44 GHz (total: 452,836,417, iterations: 999999)
    1,182.801068 instructions per iteration, 2,612 instr/cycle (total: 1,182,799,886, iterations: 999999)
    267.143901 branch instructions per iteration, 2,62 G/sec (total: 267,143,634, iterations: 999999)

Relative Delta:

            before   after    improvement
    nsecs   358.7    102.0    3.52x
    cycles  896.5    452.8    1.98x
    instr.  2227.0   1182.8   1.88x
    branch  560.0    267.1    2.10x

This is quite a significant change for such a trivial patch.

Change-Id: I5872fe8f1158ff9f6bf306ca8b069559cb59beec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 765193693982abdbc53910ff0d7d1149332ca83e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 22e66638a6c984d366057d1bb0c6de6dc65df373)
2025-03-04 08:51:35 +00:00
..
3rdparty Update bundled libpng to version 1.6.47 2025-02-26 16:21:57 +00:00
android Android: Fix cursorHandle and EditPopup positions 2025-02-10 21:26:32 +00:00
assets Use QThread::isMainThread() in a few places 2025-02-28 00:10:15 +00:00
concurrent Qt Concurrent documentation: fix Forward Iterator example container 2025-02-13 20:33:23 +00:00
corelib Optimize QTimeZone::utc() 2025-03-04 08:51:35 +00:00
dbus Use QThread::isMainThread() in a few places 2025-02-28 00:10:15 +00:00
entrypoint CMake: Correctly annotate the Entrypoint (winmain) SBOM license ID 2024-06-19 08:15:40 +00:00
gui Raster engine: Fix painting of zero length, square cap wide lines 2025-03-01 04:54:25 +00:00
network Do not keep the headers and message body in case of temporary redirect 2025-02-21 00:03:44 +00:00
opengl Doc: Fix method docs for QOpenGLTexture::setWrapMode 2025-01-25 14:21:29 +00:00
openglwidgets Remove GENERATE_CPP_EXPORTS argument 2024-06-13 14:39:17 +00:00
platformsupport libinput: Fix developer build without xkbcommon 2025-02-17 20:27:51 +00:00
plugins QWindowsTheme: Set highlight color to accent color in light mode 2025-02-21 21:24:31 +00:00
printsupport Docs: Add that Qt Print Support is not available on Android 2025-01-22 02:25:28 +00:00
sql QtSql: fix GCC -Wextra-semi warnings after member function definitions 2024-12-20 10:40:03 +00:00
testinternal Bundle Kitware's RunCMake test module 2025-02-26 20:13:33 +00:00
testlib QBenchmarkPerfEvents: help Coverity understand the code 2025-02-20 09:22:06 +00:00
tools Update PCRE2 to 10.45 2025-02-18 11:30:02 +00:00
widgets Use QThread::isMainThread() in a few places 2025-02-28 00:10:15 +00:00
xml [QDomNodePrivate] delete unnecessary pointer check from the statement 2024-12-12 17:36:21 +00:00
CMakeLists.txt Bundle Kitware's RunCMake test module 2025-02-26 20:13:33 +00:00