[Development] QStringRef conversion functions

Girish Ramakrishnan girish at forwardbias.in
Mon Jun 11 23:54:44 CEST 2012


Hi,

On Mon, Jun 11, 2012 at 11:38 AM, Keith Gardner
<kgardner at zebraimaging.com> wrote:
> I was wondering if there would be a possibility of getting some of the
> conversion functions that are in QString implemented in QStringRef (toInt,
> toFloat, etc...).  The reasoning behind this is that I am using the
> QXMLStreamReader to parse an XML file with over 88,704 floating point
> values.  I am trying to improve the speed at which the file is parsed and I
> believe one of the bottlenecks is taking an attribute of QStringRef and
> copying its data into a QString in order to convert to a float.  I would
> prefer that the copy never happen but that would require some more
> intelligence be added into the QStringRef class.
>

I am tempted to say it's 5.1 material but it would be nice to see how
much gains you are getting out of these new apis and how intrusive the
new code is. Can you push your change to gerrit ?

Thanks,
Girish



More information about the Development mailing list