Andy Brice wrote:
>The default compiler optimisation flags set by Qt are:
>-O1 (Visual Studio)
>But I did some experiments with my genetic algorithm code and found
>these weren't the best settings for me. If you are interested the
>results are here:
That was a very interesting read. Ten times speed improvement is something
to be proud of.
I did some optimisation of QtDBus between Qt 4.2 and 4.3, but I only
achieved 6x speed improvement :-)
In any case, for Linux, I recommend using valgrind --tool=callgrind to
profile your application. It runs the application entirely within an
emulated environment. If you turn on some more information collection,
you'll be able to determine if you're having cache misses too.
Another good profiler for Linux is oprofile. Valgrind does estimates based
on the instruction count, while oprofile is time-based. Both tools can be
useful and be able to find issues the other won't.
Finally, when you're investigating a multi-threaded approach to
PerfectTablePlan, I suggest you take a look at QtConcurrent. Distributing
a genetic algorithm should be more-or-less simple with QtConcurrent. For
example, each individual in a generation gets a thread and you wait for
them all to be done.
Thiago José Macieira - thiago.macieira AT trolltech.com
Trolltech ASA - Sandakerveien 116, NO-0402 Oslo, Norway