PATCH/RFC Pool allocations of QStringData objects..
Maks Orlovich
kde-optimize@mail.kde.org
Sun, 19 Jan 2003 11:23:59 -0500
On Saturday 18 January 2003 11:25 am, Maks Orlovich wrote:
> > This number of course, deserves a pause. This means, if it's correct,
> > that we have created 100,000 QStringData and hence QString objects during
> > the startup! And subtracting frees from allocs, we have some 26,784
> > strings in memory!
>
> <snip>.
<Sigh>. I'll get it right. Sometime. One of those days. Yes, really.
(The last numbers were run with glibc-2.3.1 malloc, not KDE malloc).
Base overhead:
KCounterProf::Cumulative: alloc = 3.62
KCounterProf::Cumulative: free = 2.57
KCounterProf::Cumulative: alloc = 3.87
KCounterProf::Cumulative: free = 2.47
KCounterProf::Cumulative: alloc = 3.65
KCounterProf::Cumulative: free = 2.65
KCounterProf::Cumulative: alloc = 3.52
KCounterProf::Cumulative: free = 3.02
Total (min): 6.3
Basic:
KCounterProf::Cumulative: alloc = 9.58
KCounterProf::Cumulative: free = 5.82
KCounterProf::Cumulative: alloc = 9.55
KCounterProf::Cumulative: free = 5.86
KCounterProf::Cumulative: alloc = 9.62
KCounterProf::Cumulative: free = 5.81
KCounterProf::Cumulative: alloc = 9.63
KCounterProf::Cumulative: free = 5.65
Total (min) : 15.28
w/o overhead: 8.98
Pooled:
KCounterProf::Cumulative: alloc = 5.37
KCounterProf::Cumulative: free = 2.82
KCounterProf::Cumulative: alloc = 5.71
KCounterProf::Cumulative: free = 2.81
KCounterProf::Cumulative: alloc = 5.33
KCounterProf::Cumulative: free = 2.78
KCounterProf::Cumulative: alloc = 5.35
KCounterProf::Cumulative: free = 2.81
Total(min): 8.16
w/o overhead: 1.86
Delta: 7.12ms, 79%.
Not much, but every bit helps..
(Thinking thoughts about how this would be like 70ms on a Pentium 100).