Re: Mimetype optimization
Olivier Goffart <[email protected]> Thu, 24 Apr 2008 22:02:17 +0200
| Newsgroups | gmane.comp.kde.devel.optimize |
|---|---|
| Message-ID | <[email protected]> |
--===============2016404634==
Content-Type: multipart/signed;
boundary="nextPart5849391.NXf6TPJyXh";
protocol="application/pgp-signature";
micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
--nextPart5849391.NXf6TPJyXh
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Le mercredi 23 avril 2008, Olivier Goffart a =C3=A9crit=C2=A0:
> Le mercredi 23 avril 2008, Jakub Stachowski a =C3=A9crit=C2=A0:
> > 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 immediat=
e,
> 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=
=20
with debug, and the inline method are not inlined.
--nextPart5849391.NXf6TPJyXh
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQBIEOdKz58lY8jWrL0RAqxIAJ9w68ZUZoY+cygjcPaQ1VEyIAx0sACfQdpP
JHxJB8FFGkY9g6tB9mMvpBo=
=S2Ir
-----END PGP SIGNATURE-----
--nextPart5849391.NXf6TPJyXh--
--===============2016404634==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Kde-optimize mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-optimize
--===============2016404634==--