Hi,

On 12/06/2012, at 1:08 AM, ext Konstantin Ritt wrote:

> 2012/6/12 Thiago Macieira <thiago.macie...@intel.com>:
>> On segunda-feira, 11 de junho de 2012 14.54.44, Girish Ramakrishnan wrote:
>>> Hi,
>>> 
>>> On Mon, Jun 11, 2012 at 11:38 AM, Keith Gardner
>>> 
>>> <kgard...@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 ?
>> 
>> We might be able to remove QStringRef before Qt 5.0 and replace it with plain
>> QString.
> 
> That is what I'd love to see in 5.0.
> Making sub-QStrings as cheap as QStringRef currently is would give us
> quite significant performance boost in some common use-cases. Then,
> QStringRef definitely should go.

Won't a QString always require an allocation for the d-ptr?  So it'll never be 
quite as cheap as QStringRef.

Cheers,

Aaron

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to