[Lazarus] Mac (or other BigEndian machine) users needed to test new Utf8StringOfChar code
Bart
bartjunk64 at gmail.com
Tue Sep 17 23:14:48 CEST 2013
On 9/17/13, Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
>> So, I conclude they perform roughly the same.
>
> Thanks for testing :-)
>
> Did you only test the 3-byte case, or also for WORD and DWORD cases? I
My FillDWord code is 20 times faster (with N being equal, so
Length(Result) being 1.33 times bigger) faster thean the code used for
the 3-byte sequence.
The FillWord code is 28 times faster than 3-byte code (N-2-byte being
1,5 * N-3-byte, so Length(Result) being equal).
Testing with all results being of equal length:
10000 calls to Utf8StringOfChar (120000 * 1-byte): 15 ticks.
10000 calls to Utf8StringOfChar (60000 * 2-byte): 16 ticks. //FillWord
10000 calls to Utf8StringOfChar (40000 * 3-byte): 561 ticks.
10000 calls to Utf8StringOfChar (30000 * 4-byte): 16 ticks. //FillDword
Bart
More information about the Lazarus
mailing list