Hm, after checking with valgrind it seems my benchmark is spending most
of the time in the QCollator constructor and not actually collating
strings, so simply using the QCollator API once it is public might
indeed solve the problem (why is constructing so slow though?). At least
I would recommend n
Come to think of it, hasn't Qt always used ICU under Linux? But yes,
I've tested Qt 5.0.1. Still it would be great if someone could confirm
my findings, so I've uploaded the benchmark:
https://bugreports.qt-project.org/browse/QTBUG-30126
Regards,
Zeno
Thiago Macieira wrote on 10.03.2013 05:32:
>
On sábado, 9 de março de 2013 20.57.09, Zeno Endemann wrote:
> So my questions: Is there interest in (or even plans for) something like
> this? Also, I can hardly believe I'm the first to do something about
> this. Does anyone know of a library that deals with the problem already?
First of all, we
Well, I have benchmarked this using Qt 5.0.1 which is already using the
ICU library, so this alone does not solve the problem. And as far as I
can tell the QCollator class more or less just wraps the ICU api. I
couldn't find any plans to develop a sorting algorithm for *lists* of
strings on top of
And we have a blog from Denis about that:
http://blog.qt.digia.com/blog/2011/06/14/string-collation-with-locales/
Regards,
Liang
On 3/9/13 8:59 PM, "Knoll Lars" wrote:
>There's a QCollator class in Qt already to fix exactly that problem, the
>plan is to make it public for Qt 5.1.
>
>Cheers,
>Lar
There's a QCollator class in Qt already to fix exactly that problem, the
plan is to make it public for Qt 5.1.
Cheers,
Lars
On 3/9/13 8:57 PM, "Zeno Endemann" wrote:
>I've been playing around with different sorting methods and have noticed
>that the naive way to sort a QStringList with localeAw
I've been playing around with different sorting methods and have noticed
that the naive way to sort a QStringList with localeAwareCompare is
atrociously slow on my system (64bit Linux, German locale - up to a
thousand times slower than using the lessThan-operator). While a
locale aware sorting is o