summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2012-08-14 13:15:11 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-15 09:17:35 +0200
commit17adbb232bfc8972ba54cbea3be9dbb24d9b4dfc (patch)
tree088e92af5575b91d94ec852d4adce7aa81871040 /mkspecs
parent4350054ab86b03b2a4e6641238b762fd80a3c5dd (diff)
Speed up construction of basic QVariants
Instead of first creating an initialized Private struct, then overwrite the member variables, we added an internal constructor that initializes the private struct sanely. In the new (inlined, internal) constructor, both the MSB bits in the bitfield are 0, and since the value of internal meta-type ID is so low that the two MSB bits should never be set, the compiler can (hopefully) optimize away the bit-fiddling initialization of the bit-field. Callgrind shows about 33% speed-up in e.g. QVariant::QVariant(int) Change-Id: I706773a71c0d8dcbe119ad15411578b81892deb5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'mkspecs')
0 files changed, 0 insertions, 0 deletions