From 5cb0368516abd293daf67711a36bbacc99422e9a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 19 Mar 2012 20:53:20 +0100 Subject: Rewrite QMap to use a RB tree QMap used to use a skiplist in Qt 4.x, which has variable sized nodes and we can thus not optimise using custom allocators. The rewrite now uses a red-black tree, and all allocations and tree operations happen in the cpp file. This will allow us to introduce custom allocation schemes in later versions of Qt. Added some more tests and a benchmark. Memory consumption of the new QMap implementation is pretty much the same as before. Performance of insertion and lookup has increased by 10-30%. iteration is slower, but still extremely fast and should not matter compared to the work usually done when iterating. Change-Id: I8796c0e4b207d01111e2ead7ae55afb464dd88f5 Reviewed-by: Thiago Macieira --- tests/benchmarks/corelib/tools/qmap/qmap.pro | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/benchmarks/corelib/tools/qmap/qmap.pro (limited to 'tests/benchmarks/corelib/tools/qmap/qmap.pro') diff --git a/tests/benchmarks/corelib/tools/qmap/qmap.pro b/tests/benchmarks/corelib/tools/qmap/qmap.pro new file mode 100644 index 0000000000..6a0c8d62bd --- /dev/null +++ b/tests/benchmarks/corelib/tools/qmap/qmap.pro @@ -0,0 +1,5 @@ +TARGET = tst_qmap +QT = core testlib +INCLUDEPATH += . +SOURCES += main.cpp +CONFIG += release -- cgit v1.2.3