diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-03-06 18:04:03 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-03-11 17:06:22 +0100 |
| commit | 9b849eea41b0f072b2b20430fbaeef7df9dff176 (patch) | |
| tree | 671cd35718a3d34964ddb095573bff3980ed9426 /src/gui/opengl/qopenglprogrambinarycache.cpp | |
| parent | b3c75be5e0347078af16d260b197d49ef363729d (diff) | |
QTimeZone: return a shared copy from utc()
The UTC time-zone never changes, not even under a locale change, so
memoize utc() using a Q_GLOBAL_STATIC cache. Check its isDestroyed()
and fall back to the current implementation in that case. This keeps
the function available even in late shutdown stages.
_This_ is a knife^Woptimization:
PASS : tst_QTimeZone::utc()
RESULT : tst_QTimeZone::utc():
- 33.1472430 nsecs per iteration (total: 331,472,431, iterations: 10000000)
+ 12.8953219 nsecs per iteration (total: 128,953,219, iterations: 10000000)
- 150.5929452 CPU cycles per iteration, 4,54 GHz (total: 1,505,929,452, iterations: 10000000)
+ 60.3382987 CPU cycles per iteration, 4,68 GHz (total: 603,382,988, iterations: 10000000)
- 396.0402927 instructions per iteration, 2,630 instr/cycle (total: 3,960,402,928, iterations: 10000000)
+ 84.0138436 instructions per iteration, 1,392 instr/cycle (total: 840,138,437, iterations: 10000000)
- 96.0069811 branch instructions per iteration, 2,9 G/sec (total: 960,069,811, iterations: 10000000)
+ 28.0024131 branch instructions per iteration, 2,17 G/sec (total: 280,024,132, iterations: 10000000)
Amends HEAD^.
Change-Id: I4496f3a4c1f64b0615930337662bcd04af0a2ade
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/gui/opengl/qopenglprogrambinarycache.cpp')
0 files changed, 0 insertions, 0 deletions
