- Queries
- All Stories
- Search
- Advanced Search
Advanced Search
Dec 24 2019
Dec 23 2019
In D26130#582447, @ervin wrote:In D26130#582391, @tcanabrava wrote:In D26130#582343, @ervin wrote:This is pointless, most compilers would do NRVO (+ move assign) here... which would be neatly obliterated by the ternary operator. This is a pessimisation you're proposing here, not an optimization.
I don't know what you are talking about, this is using return time optimization. have you tested the code or just assumed that ternaries will not do NRVO?
OK, let me try again.
I did benchmark old and new before my first reply (and I wonder why I wrote pessimisation previously, I think I got carried away a bit, apologies). What I meant was that: if and when there is a small measurable gain, I don't think it is as dramatic as you make it sound. The point I was trying to make was that since the ternary will prevent NRVO, you're trading one return optimization (NRVO) for another (RVO). In other words, the same amount of objects will be involved. It's far from the "there was no return optimization now there's one" that I understood you're trumping. Thus the gain between the two versions when there is, is unlikely to come from RVO. It is mostly about avoiding the move assignment in the newer version (roughly a couple pointers copy).
Now, the really interesting bit you did is wrapping "d->" in QStringLiteral, that's what gives a large gain for the dpointer case (when I did the benchmarking I did it with QStringLiteral in both versions, otherwise I knew it was just unfair).
Obviously I'd be totally cool with just a QStringLiteral change since it would have real value (divides time by three roughly, this is definitely a large gain).
Dec 22 2019
Dec 20 2019
Dec 15 2019
Sep 21 2019
Aug 28 2019
Aug 25 2019
Aug 17 2019
Aug 12 2019
Aug 11 2019
Aug 5 2019
Jul 18 2019
Jul 10 2019
Jul 9 2019
Jun 29 2019
Jun 22 2019
Jun 16 2019
Jun 15 2019
Jun 3 2019
May 21 2019
Closed because of: https://phabricator.kde.org/D21123
May 10 2019
May 7 2019
May 6 2019
May 4 2019
Apr 26 2019
Apr 23 2019
Apr 19 2019
Apr 17 2019
Apr 2 2019
Apr 1 2019
Mar 26 2019
Do you have an estimation of how fast is the code now with openmp ?
Mar 23 2019
Mar 20 2019
Mar 19 2019
Update style again
@vonreth My msvc installation did not set such variables and it was necessary to find out in the code what is happening, this PR adds such error message to notify the user what is going on and how to fix that.
Update commit message and fix wrong year in msvc
Update style