Re: Where is stringbuilder?
- From: erewhon@xxxxxxxxxx (J French)
- Date: Fri, 20 Oct 2006 07:14:35 GMT
On Thu, 19 Oct 2006 23:00:54 -0500, Rob Kennedy <me3@xxxxxxxxxxx>
wrote:
J French wrote:
Move would probably not be much faster, as although it moves 4 byte
chunks IIRC it assumes that the start position is on a 4 byte boundary
Also it uses : REP MOVSD
- which is a lot more elegant, but very slow
The Move procedure doesn't assume any alignment. At least, I can't find
any alignment requirements in the MOVSD documentation.
I explained myself incorrectly
When efficiently moving memory the trick is to 'top' and 'tail' with a
4 byte aligned 'move' of 4 bytes in between them.
Delphi 4 does the 'tail' bit, but if the start is not 4 byte aligned
it will be moving DWORDS that are crossing the 4 byte boundaries
Since this is pretty inefficient, I assume that the Delphi designers
'assumed' that mostly memory would be 4 byte aligned.
That or they never thought about it ....
I'm not really worried about micro-optimization, but for core library
routines that is one of the things we would watch out for.
.
- References:
- Where is stringbuilder?
- From: brett
- Re: Where is stringbuilder?
- From: Rob Kennedy
- Re: Where is stringbuilder?
- From: J French
- Re: Where is stringbuilder?
- From: Maarten Wiltink
- Re: Where is stringbuilder?
- From: J French
- Re: Where is stringbuilder?
- From: Rob Kennedy
- Where is stringbuilder?
- Prev by Date: Calling dot.net code/assembly from a webpage ?
- Next by Date: Re: Where is stringbuilder?
- Previous by thread: Re: Where is stringbuilder?
- Next by thread: How to keep IDE preferences?
- Index(es):