[Lazarus] Mac (or other BigEndian machine) users needed to test new Utf8StringOfChar code

José Mejuto joshyfun at gmail.com
Tue Sep 17 13:44:31 CEST 2013


El 17/09/2013 10:48, Bart escribió:

> I would think that FiilWord and FillDWord is faster than that.
> For 3-byte sequence I almost did the same as you.

Hello,

In  most architectures (32 and 64 bits at least) memory moves of less 
than 16 bytes are faster done one by one. Just the call to the function 
kills the possible performance gain.

> More to the point: does it produce correct results on BigEndian.
> Theory (as in: as far as I can see and "compute in my head") says yes,
> but I would like confirmation (on my secons code example).

I had not fully checked you code, but I think you are coding always the 
UTF16 as little endian, and in big endian machines the UTF16 should be 
big endian also.

I do not have a big endian machine in order to perform some tests.


-- 

	José Mejuto




More information about the Lazarus mailing list