[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-22 Thread Sergio Martins via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=361691 Sergio Martins changed: What|Removed |Added Latest Commit||http://commits.kde.org/claz

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-18 Thread Stephen Kelly via KDE Bugzilla
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)

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-18 Thread Sergio Martins via KDE Bugzilla
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

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-16 Thread Stephen Kelly via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=361691 Stephen Kelly changed: What|Removed |Added Resolution|INVALID |---

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-16 Thread Stephen Kelly via KDE Bugzilla
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.

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-15 Thread Sergio Martins via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=361691 Sergio Martins changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-13 Thread Sergio Martins via KDE Bugzilla
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.

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-13 Thread Sergio Martins via KDE Bugzilla
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;

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-13 Thread Stephen Kelly via KDE Bugzilla
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

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-13 Thread Stephen Kelly via KDE Bugzilla
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

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-13 Thread Stephen Kelly via KDE Bugzilla
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.

[clazy] [Bug 361691] Suggestion to turn string into QStringLiteral instead of QLatin1String

2016-04-12 Thread Sergio Martins via KDE Bugzilla
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