I have a function that gets a QStringList as a parameter.
The QStringList is created in place for parameter passing. Two possibilities come to my mind for this:
myFunction(QStringList() << myQString); // possibility 1
myFunction(QStringList { myQString }); // possibility 2
Which possibility is more performant?
Here is the benchmark:
Debug
Release:
Compiled using GCC. Possibility 1
QStringList{ sneed }is about a third faster.