diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-20 16:25:32 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-21 11:37:21 (GMT) |
commit | f5f89d34fa98600a95c4b1b8b62bd794ab8c8e3b (patch) | |
tree | 97a25ac3377c7e2dc0aa43e38daac81c59b7aa44 /tests/auto/qnumeric | |
parent | 4aa4111864df9e8a7917b021d6e31214e8c7a0bd (diff) | |
download | Qt-f5f89d34fa98600a95c4b1b8b62bd794ab8c8e3b.zip Qt-f5f89d34fa98600a95c4b1b8b62bd794ab8c8e3b.tar.gz Qt-f5f89d34fa98600a95c4b1b8b62bd794ab8c8e3b.tar.bz2 |
Optimize contrcuction of variant of type pointer.
Constructing a variant of a pointer type was previously quite slow:
QVariant had no information it was a pointer. It had to create a
QVariant::PrivateShared, ask the QMetaType for a constructor (slow as it
involve locking mutextes) and allocate a pointer.
By detecting a pointer in qVariantFromValue, we can store the pointer
value dirrectly in the Variant union. We then avoid 2 allocations,
and the expensive locking in QMetaType::construct
Reviewed-by: Thierry
Diffstat (limited to 'tests/auto/qnumeric')
0 files changed, 0 insertions, 0 deletions