[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-optimize
Subject: Re: QCString construction
From: George Staikos <staikos () kde ! org>
Date: 2007-02-10 1:22:13
Message-ID: D06D6C5D-2BF4-40DC-8F24-C64E0C12541A () kde ! org
[Download RAW message or body]
On 9-Feb-07, at 8:16 PM, David Faure wrote:
> This leads me to 3 patches.
>
> One for kmail, I wrote a utility function for creating a QCString
> from char*+size, and used that
> when creating a QCString from a DwString where it matters (i.e.
> where I found pretty large strings
> to be used when attaching large files).
> Can a kmail developer review the change to KMMessage::asString()
> and asSendableString(), too?
> It avoids a asString() (Assemble) and a fromString (Parse), but I
> hope it's doing the right thing.
IIRC there are lots more cases of mimelib doing things like this
including in the internals.
> And one for mimelib, not really related to QCString: am I right
> that memcpy is faster than for (i=0; i < pos1; ++i) *to++ = *from++; ?
> At least in gdb it seems faster, but I didn't benchmark it.
> Hopefully memcpy is done by a single CPU instruction or something,
> right?
memcpy() is often implemented with vector operations so it should
definitely be faster in many cases.
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
_______________________________________________
Kde-optimize mailing list
Kde-optimize@kde.org
https://mail.kde.org/mailman/listinfo/kde-optimize
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic