protux-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Protux-devel] simple open task


From: Remon Sijrier
Subject: [Protux-devel] simple open task
Date: Wed, 24 Mar 2004 17:39:54 +0100
User-agent: KMail/1.6.1

Hi Luciano,

You started this thread a while ago, and as I did some research on this when 
working on 0.20.0 I was interested how much less expensive the call is. 
(QString s; s.setNum(x); versus QString s = QString::number(x); )

I made a test program and the benefit is only about 1.5% which is not that 
much. 

Fortunately I was reading at dot.kde.org and they posted a new article " KDE 
Developer's Corner: Common Programming Mistakes" You can find it here:
http://developer.kde.org/documentation/other/mistakes.html

It has some nice tips among this one:

- Don't use QString when you do not need Unicode support because QString uses 
Unicode conversion internally which is very expensive, but use QCString 
instead.

I tested it, and indeed it is far less expensive (almost by a factor 2 !!).

If you agree and I have some time I'll replace all calls to QString::SetNum() 
to QCString::SetNum().

Let me know what you think about it.


Best wishes,

Remon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]