https://bugs.kde.org/show_bug.cgi?id=361691
Sergio Martins changed:
What|Removed |Added
Latest Commit||http://commits.kde.org/claz
https://bugs.kde.org/show_bug.cgi?id=361691
--- Comment #12 from Stephen Kelly ---
Your benchmark is only for the case of the searched string being empty. In
other benchmarks here, the two perform the same.
That isn't a good reason for clazy to recommend something that 1)
https://bugs.kde.org/show_bug.cgi?id=361691
--- Comment #11 from Sergio Martins ---
That's cheating, that benchmark doesn't compare QLatin1String vs
QStringLiteral, well, maybe it does, for 0.1 % of the code, the remaining 99.9%
it's running the common implementation between
https://bugs.kde.org/show_bug.cgi?id=361691
Stephen Kelly changed:
What|Removed |Added
Resolution|INVALID |---
https://bugs.kde.org/show_bug.cgi?id=361691
--- Comment #9 from Stephen Kelly ---
Upstreamed: https://bugreports.qt.io/browse/QTBUG-52617
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=361691
Sergio Martins changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
https://bugs.kde.org/show_bug.cgi?id=361691
--- Comment #6 from Sergio Martins ---
Almost 50% of difference (looking at task-clock or cycles), make sure to build
in release mode.
Used Qt 5.6.
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=361691
--- Comment #5 from Sergio Martins ---
I don't have the original, but just wrote this:
#include
#include
#define N 1
bool testQStringLiteral()
{
qDebug() << "QStringLiteral";
bool result = false;
QString s;
https://bugs.kde.org/show_bug.cgi?id=361691
--- Comment #4 from Stephen Kelly ---
I also tried with larger strings. The fact that the QLatin1String overload is
slower is suspect. It could be due to the test string being very small, but
that's what I expect is the primary
https://bugs.kde.org/show_bug.cgi?id=361691
--- Comment #3 from Stephen Kelly ---
I tried to replicate your result unsuccessfully. Do you still have your
benchmark? I tried Qt 5.4.2 and some recent git branch.
#include
class StringBenchmark : public QObject
{
Q_OBJECT
https://bugs.kde.org/show_bug.cgi?id=361691
--- Comment #2 from Stephen Kelly ---
That sounds like a bug in QString, right?
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=361691
--- Comment #1 from Sergio Martins ---
contains(QL1S) and indexOf( QL1S) are 30% slower than their QString
counterparts, last time I measured.
It was caused by some fromLatin1_helper() calls, or something like that (I
don't recall the
12 matches
Mail list logo