On 9/17/13, Hans-Peter Diettrich <[email protected]> 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

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to