Cleanup and optimize code a bit by calling senderSignalIndex less.


Profiling shows that sender() and senderSignalIndex(), which again calls
sender() internally, are the hotspots in benchPropertyUpdates.

To speed things up a bit, call senderSignalIndex only once whenever a
signal is emitted. The performance gain is about 27% (16ms vs. 22ms).

While at it, also re-use the global s_destroyedSignalIndex static and
also call sender() only once even when assertions are enabled.

Change-Id: I90cd1a2b453e5c40d0f41276968f4545b42076bc
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
commit110890e091cd1f112b18196048f62efe7b858e19
parent25568c9d01e5ace5557c9aebc42d0de3cf2873e4
authorMilian Wolff <milian.wolff@kdab.com>
committerThe Qt Project <gerrit-noreply@qt-project.org>
commit timeFri, 27 Dec 2013 15:51:02 +0100