From 98c82fb445acf45cc4c4bc86a5adda43358127bf Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 24 Nov 2020 11:08:13 +0100 Subject: Inline access to the QBindingStorage And inline the fast checks inside the methods in QBindingStorage. This allows QObjectBindableProperty and friends to inline all the fast checks and almost completely eliminates the overhead for property accesses when no bindings are being used. Read and write times of QObject based properties when no bindings are being used: Read Write Old style property: 3.8ns 7.3ns QObjectBindableProperty (no notification): 4.5ns 4.3ns QObjectBindableProperty (with signal): 4.5ns 7.6ns QObjectBindableProperty (inline accessors): 3.2ns 3.4ns Numbers without this patch: Old style property: 3.8ns 7.9ns QObjectBindableProperty (no notification): 7.2ns 7.7ns QObjectBindableProperty (with signal): 7.2ns 16.0ns QObjectBindableProperty (inline accessors): 6.3ns 6.7ns Pick-to: dev 6.0.0 Change-Id: Ifd1fa3a489c3be8b1468c0b88af547aac397f412 Reviewed-by: Fabian Kosmale --- src/corelib/kernel/qobject.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/corelib/kernel/qobject.cpp') diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 54bed0564f..9c87c57a10 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4057,24 +4057,6 @@ QList QObject::dynamicPropertyNames() const return QList(); } -/*! - \internal -*/ -QBindingStorage *QObject::bindingStorage() -{ - Q_D(QObject); - return &d->bindingStorage; -} - -/*! - \internal -*/ -const QBindingStorage *QObject::bindingStorage() const -{ - Q_D(const QObject); - return &d->bindingStorage; -} - #endif // QT_NO_PROPERTIES -- cgit v1.2.3