[Development] Container benchmark was HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO
Smith Martin
Martin.Smith at theqtcompany.com
Sun Jul 12 17:34:25 CEST 2015
>I expect you to view those videos and to read those articles and then I expect
>you to apologise for this mail of yours.
Well qdoc was taking about 15 minutes to run on Qt5, so I followed Andreas' advice and changed the high-level algorithm. Now it runs in about 2 minutes.
I suspect that swapping a QList for a QVector, where the QList is completely built all at once with usually only 2 or 3 elements and then traversed and destroyed all in the same function, won't reduce that 2 minutes by much. And we only run qdoc to rebuild the documentation.
I think this software engineering profession attracts obsessive-compulsive type thinkers (AKA perfectionists), because building a software system from a proper functional requirements list (written or mental) makes achieving perfection possible. Passing all the requirements tests is perfection by definition.
But the obsessive-compulsive type thinker (I am one myself) can become a bit of a pain sometimes. "striving to better, oft we mar what's well" -- Kink Lear
I like QList.
martin
________________________________________
From: development-bounces+martin.smith=theqtcompany.com at qt-project.org <development-bounces+martin.smith=theqtcompany.com at qt-project.org> on behalf of Marc Mutz <marc.mutz at kdab.com>
Sent: Sunday, July 12, 2015 6:18 PM
To: development at qt-project.org
Subject: Re: [Development] Container benchmark was HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO
On Sunday 12 July 2015 16:29:58 Andreas Aardal Hanssen wrote:
> > On 12 Jul 2015, at 16:58, Marc Mutz <marc.mutz at kdab.com> wrote:
> > That's because your benchmark runs entirely in L1.
> > If you want to test containers of 10, 100, 1000 and 10000 elements each,
> > then make
> > - one run over 1×N containers of 10000 elements each,
> > - one run over 10×N containers of 1000 elements each,
> > - one run over 100×N containers of 100 elements each,
> > - one run over 1000×N containers of 10 elements each.
>
> This is getting defensive, and quite frankly, a bit boring. The fact that
> half of the emails are from one author defending his absolute view with
> increasingly complex arguments suggests action points be taken and the
> debate be closed.
ROTFL. You made my day. Martin asks increasingly narrowly.focused questions,
and you make that into me being defensive. Yeah, right.
Obviously, I beg to differ. It's not *my* view. It's just not *your* view:
- Scott Meyers: https://www.youtube.com/watch?v=WDIkqP4JbkE
- Chandler Carruth: https://www.youtube.com/watch?v=fHNmRkzxHWs
- Herb Sutter: https://www.youtube.com/watch?v=L7zSU9HI-6I
- Alex Stepanov & Bjarne Stroustup:
http://www.stepanovpapers.com/container_benchmark.cpp
- Ulrich Drepper: http://www.akkadia.org/drepper/cpumemory.pdf
Clearly, all of the above (and Thiago, and Peppe, and Milian) are all wrong
and I am part of a big conspiracy.
> Clearly Marc should write a /book/ about which tricks should be applied
> when writing high performance code.
Those books have already been written. You should read them!
- Herb Sutter: Exception C++, More Exceptional C++, C++ Coding Standards
- Scott Meyers: Effective C++, More Effective C++, Effective STL, Effective
Modern C++
- ...
I expect you to view those videos and to read those articles and then I expect
you to apologise for this mail of yours.
Thanks,
Marc
--
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
More information about the Development
mailing list