[Interest] QMap<int64_t> significantly slower than QMap<int32_t>

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Sun Sep 22 11:24:09 CEST 2013


I don't, I have very only strong conviction from tests on a big large
program. I was hoping that someone had an idea about the cause... Would
this help to make one?

I did a quick test : inserting 10000000 items in a QMap<int32_t, int> and
QMap<int64_t, int> using rand() for key and value, measuring the delay with
QDateTime::currentMsecsSinceEpoch.
The int32 version took about 2100ms while the int64 took about 2300ms.

So maybe this is only a memory cache issue. The difference is higher in my
app (measured with a profiler), maybe because it decreases cache efficiency
of other code parts.

Using gcc 4.8.0 mingw64 rubenvb build, with Qt 4.8.1

Etienne



2013/9/21 Giuseppe D'Angelo <dangelog at gmail.com>

> On 21 September 2013 14:47, Etienne Sandré-Chardonnal
> <etienne.sandre at m4x.org> wrote:
> > I'm experiencing this issue : a 64-bit int QMap slows my app comparing
> to a
> > 32-bit int one. I'm compiling with GCC-MinGW64, so a 64-bit compiler.
> > Shouldn't it be as fast? The QMap is not very large (maybe 1000 elements)
> > and I have much bigger structures in my app, so the memory size should
> not
> > be responsible for the slowdown.
>
> Do you have a SSCCE [1] that clearly shows the issue?
>
> [1] http://sscce.org/
>
> --
> Giuseppe D'Angelo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130922/134731cc/attachment.html>


More information about the Interest mailing list