summaryrefslogtreecommitdiff
path: root/src/corelib/arch/symbian/heap_hybrid.cpp
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2010-09-27 16:53:49 +0100
committermread <qt-info@nokia.com>2010-09-30 15:48:39 +0100
commit47a5f678f5eefffd456d3454364d806ba29e8920 (patch)
tree940ee03706d280b5f13769124f462a97873ec08f /src/corelib/arch/symbian/heap_hybrid.cpp
parent2a8c5d045a88633fab8d86e56ad0f2fa7c8608c1 (diff)
downloadqt4-tools-47a5f678f5eefffd456d3454364d806ba29e8920.tar.gz
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
Diffstat (limited to 'src/corelib/arch/symbian/heap_hybrid.cpp')
-rw-r--r--src/corelib/arch/symbian/heap_hybrid.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/arch/symbian/heap_hybrid.cpp b/src/corelib/arch/symbian/heap_hybrid.cpp
index 4d101ed23d..f650b5b52b 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}