Mimetype optimization

Olivier Goffart ogoffart at bepointbe.be
Thu Apr 24 22:02:17 CEST 2008


Le mercredi 23 avril 2008, Olivier Goffart a écrit :
> Le mercredi 23 avril 2008, Jakub Stachowski a écrit :
> > Attached is a patch to fix these problems.
> > I added some static QChar() vars (conversion char* -> QChar took ~10% of
> > matchFileName). Is it a problem?
>
> You can do
> pattern.contains(ushort('*'))
>
> since the implicit convertion from ushort to QChar is inline and immediate,
> it does with no cost at all.    (QChar is actually a ushort internally)

Actually, QLatin1Char('*') is also perfectly optimized
If it show on your profiling information it is maybe because Qt is compiled 
with debug, and the inline method are not inlined.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-optimize/attachments/20080424/3ac024b9/attachment.pgp 


More information about the Kde-optimize mailing list