diff options
author | mread <qt-info@nokia.com> | 2010-09-27 15:53:49 (GMT) |
---|---|---|
committer | mread <qt-info@nokia.com> | 2010-09-30 14:48:39 (GMT) |
commit | 47a5f678f5eefffd456d3454364d806ba29e8920 (patch) | |
tree | 940ee03706d280b5f13769124f462a97873ec08f | |
parent | 2a8c5d045a88633fab8d86e56ad0f2fa7c8608c1 (diff) | |
download | Qt-47a5f678f5eefffd456d3454364d806ba29e8920.zip Qt-47a5f678f5eefffd456d3454364d806ba29e8920.tar.gz Qt-47a5f678f5eefffd456d3454364d806ba29e8920.tar.bz2 |
hybrid allocator tuning
Set various pragmas and defines to tune the hybrid allocator.
Performance test was the time takes to allocate or deallocate as
appropriate 1,000,000 times from a set of 100,000 pointers, selected at
random, with sizes generated randomly with min 2, max 5960, avg 46.
The function was exp(8 - log(2 + rand(0..1023))) * rand(1 or 4).
The following parameters were chosen:
* pragma arm, for ~1.2%
* pragma Otime, for ~3%
* pragma O2, already the compiler default, just to be sure
* all possible slab sizes enabled, for ~1%
NB Disabling BTrace would also gain ~1.5%, but that seems like a bad
thing to do. Not done.
Task-number: QT-3967
Reviewed-by: Shane Kearns
-rw-r--r-- | src/corelib/arch/symbian/heap_hybrid.cpp | 3 | ||||
-rw-r--r-- | src/corelib/arch/symbian/qt_hybridHeap_symbian_p.h | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/arch/symbian/heap_hybrid.cpp b/src/corelib/arch/symbian/heap_hybrid.cpp index 4d101ed..f650b5b 100644 --- a/src/corelib/arch/symbian/heap_hybrid.cpp +++ b/src/corelib/arch/symbian/heap_hybrid.cpp @@ -45,7 +45,8 @@ // if non zero this causes the iSlabs to be configured only when the chunk size exceeds this level #define DELAYED_SLAB_THRESHOLD (64*1024) // 64KB seems about right based on trace data -#define SLAB_CONFIG 0xabe // Use slabs of size 48, 40, 32, 24, 20, 16, 12, and 8 bytes +//#define SLAB_CONFIG 0xabe // Use slabs of size 48, 40, 32, 24, 20, 16, 12, and 8 bytes +#define SLAB_CONFIG 0x3fff // Use all slab sizes 4,8..56 bytes #ifdef _DEBUG #define __SIMULATE_ALLOC_FAIL(s) if (CheckForSimulatedAllocFail()) {s} diff --git a/src/corelib/arch/symbian/qt_hybridHeap_symbian_p.h b/src/corelib/arch/symbian/qt_hybridHeap_symbian_p.h index eb43bf8..55c8fb2 100644 --- a/src/corelib/arch/symbian/qt_hybridHeap_symbian_p.h +++ b/src/corelib/arch/symbian/qt_hybridHeap_symbian_p.h @@ -52,6 +52,13 @@ #ifdef QT_USE_NEW_SYMBIAN_ALLOCATOR +#ifndef __WINS__ +#pragma push +#pragma arm +#pragma Otime +#pragma O2 +#endif + #include "common_p.h" #ifdef QT_SYMBIAN_HAVE_U32STD_H #include <u32std.h> |