Go to file
Milian Wolff bd35260415 Microoptimize QObject::activate.
This patch removes temporary variables that are not used in all cases.
This reduces the instruction count per iteration for the corresponding
benchmark by 1 or 2.

Before:

********* Start testing of QObjectBenchmark *********
Config: Using QtTest library 5.7.0, Qt 5.7.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.0)
PASS   : QObjectBenchmark::initTestCase()
PASS   : QObjectBenchmark::signal_slot_benchmark(simple function)
RESULT : QObjectBenchmark::signal_slot_benchmark():"simple function":
     21.0065466 instructions per iteration (total: 210,065,466, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(single signal/slot)
RESULT : QObjectBenchmark::signal_slot_benchmark():"single signal/slot":
     405.0829559 instructions per iteration (total: 4,050,829,559, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(multi signal/slot)
RESULT : QObjectBenchmark::signal_slot_benchmark():"multi signal/slot":
     405.0812465 instructions per iteration (total: 4,050,812,465, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(unconnected signal)
RESULT : QObjectBenchmark::signal_slot_benchmark():"unconnected signal":
     104.0147348 instructions per iteration (total: 1,040,147,349, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(single signal/ptr)
RESULT : QObjectBenchmark::signal_slot_benchmark():"single signal/ptr":
     369.1021099 instructions per iteration (total: 3,691,021,100, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(functor)
RESULT : QObjectBenchmark::signal_slot_benchmark():"functor":
     370.0982862 instructions per iteration (total: 3,700,982,862, iterations: 10000000)
PASS   : QObjectBenchmark::cleanupTestCase()
Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted, 6036ms
********* Finished testing of QObjectBenchmark *********

After:

********* Start testing of QObjectBenchmark *********
Config: Using QtTest library 5.7.0, Qt 5.7.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.0)
PASS   : QObjectBenchmark::initTestCase()
PASS   : QObjectBenchmark::signal_slot_benchmark(simple function)
RESULT : QObjectBenchmark::signal_slot_benchmark():"simple function":
     21.0061664 instructions per iteration (total: 210,061,664, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(single signal/slot)
RESULT : QObjectBenchmark::signal_slot_benchmark():"single signal/slot":
     403.0829161 instructions per iteration (total: 4,030,829,162, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(multi signal/slot)
RESULT : QObjectBenchmark::signal_slot_benchmark():"multi signal/slot":
     403.0836305 instructions per iteration (total: 4,030,836,305, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(unconnected signal)
RESULT : QObjectBenchmark::signal_slot_benchmark():"unconnected signal":
     104.0150038 instructions per iteration (total: 1,040,150,039, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(single signal/ptr)
RESULT : QObjectBenchmark::signal_slot_benchmark():"single signal/ptr":
     368.0981987 instructions per iteration (total: 3,680,981,988, iterations: 10000000)
PASS   : QObjectBenchmark::signal_slot_benchmark(functor)
RESULT : QObjectBenchmark::signal_slot_benchmark():"functor":
     369.1179429 instructions per iteration (total: 3,691,179,429, iterations: 10000000)
PASS   : QObjectBenchmark::cleanupTestCase()
Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted, 5975ms
********* Finished testing of QObjectBenchmark *********

Change-Id: Iba3bffbca5b58109816c8b1a7dea0796b18c8785
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-16 18:00:16 +00:00
bin Add Intel copyright to files that Intel has had non-trivial contribution 2016-01-21 22:44:21 +00:00
config.tests Merge remote-tracking branch 'origin/5.6' into dev 2016-02-11 08:25:04 +01:00
dist Update the Qt 5.5.1 changelog for qtbase 2015-09-23 06:49:28 +00:00
doc Merge remote-tracking branch 'origin/5.6' into dev 2016-02-02 15:57:44 +01:00
examples Merge remote-tracking branch 'origin/5.6' into dev 2016-02-11 08:25:04 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs Generalize iOS simulator and device exclusive build 2016-02-12 18:43:31 +00:00
qmake Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-02-11 12:57:10 +00:00
src Microoptimize QObject::activate. 2016-02-16 18:00:16 +00:00
tests QtConcurrentRun: add unittest for polling for isFinished() 2016-02-15 13:53:57 +00:00
tools Add initial clang-cl support to Qt 2016-02-11 12:54:06 +00:00
util Merge remote-tracking branch 'origin/5.6' into dev 2016-02-02 15:57:44 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore rewrite qtAddToolEnv() 2016-01-08 09:36:13 +00:00
.qmake.conf Merge remote-tracking branch 'origin/5.6' into dev 2015-10-23 14:45:03 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Generalize iOS simulator and device exclusive build 2016-02-12 18:43:31 +00:00
configure.bat Add initial clang-cl support to Qt 2016-02-11 12:54:06 +00:00
header.BSD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.BSD-OLD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.COMM Add header template for commercial only modules 2015-10-19 10:37:18 +00:00
header.FDL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.FDL-OLD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.GPL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.GPL-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-NOGPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPLv3 fix up license references 2015-08-13 11:13:09 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Bump copyright year to 2016 2016-01-29 13:30:04 +00:00
LICENSE.LGPLv21 Bump copyright year to 2016 2016-01-29 13:30:04 +00:00
LICENSE.PREVIEW.COMMERCIAL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
qtbase.pro Merge remote-tracking branch 'origin/5.6' into dev 2015-11-18 09:01:51 +01:00
sync.profile make a proper header-only module for QtZlib 2015-11-17 20:22:17 +00:00